Module: Add a missing error return case.

This commit is contained in:
Unknown W. Brackets
2021-04-10 17:11:40 -07:00
parent f88648c5a2
commit eedd0b32dd
+2
View File
@@ -1184,6 +1184,8 @@ static PSPModule *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 load
*error_string = StringFromFormat("ELF/PRX truncated: %d > %d", (int)size, (int)elfSize);
module->Cleanup();
kernelObjects.Destroy<PSPModule>(module->GetUID());
// TODO: Might be the wrong error code.
error = SCE_KERNEL_ERROR_FILEERR;
return nullptr;
}
const auto maxElfSize = std::max(head->elf_size, head->psp_size);