Don't leak block on allocation failure.

This commit is contained in:
Unknown W. Brackets committed 2013-02-28 00:19:48 -08:00
1 parent eab7777ec3
commit 1e3f5477c3
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -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;
}