mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-27 08:13:34 +01:00
Don't leak block on allocation failure.
This commit is contained in:
1 parent
eab7777ec3
commit
1e3f5477c3
2 files changed
+2
-1
No files matched your search
@@ -506,6 +506,7 @@ int sceKernelAllocPartitionMemory(int partition, const char *name, int type, u32
|
||||
PartitionMemoryBlock *block = new PartitionMemoryBlock(&userMemory, name, size, (MemblockType)type, addr);
|
||||
if (!block->IsValid())
|
||||
{
|
||||
delete block;
|
||||
ERROR_LOG(HLE, "ARGH! sceKernelAllocPartitionMemory failed");
|
||||
return SCE_KERNEL_ERROR_MEMBLOCK_ALLOC_FAILED;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user