From b8b134da75404605f58b6d23e576f56a953643f1 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Fri, 24 Jul 2015 23:09:47 -0500 Subject: [PATCH] module Retain instead of RetainHandle --- src/xenia/kernel/xboxkrnl_modules.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xenia/kernel/xboxkrnl_modules.cc b/src/xenia/kernel/xboxkrnl_modules.cc index 93ec98442..ebb0f60a5 100644 --- a/src/xenia/kernel/xboxkrnl_modules.cc +++ b/src/xenia/kernel/xboxkrnl_modules.cc @@ -226,7 +226,7 @@ SHIM_CALL XexLoadImage_shim(PPCContext* ppc_context, // Not found; attempt to load as a user module. auto user_module = kernel_state->LoadUserModule(module_name); if (user_module) { - user_module->RetainHandle(); + user_module->Retain(); hmodule = user_module->hmodule_ptr(); result = X_STATUS_SUCCESS; } @@ -263,6 +263,7 @@ SHIM_CALL XexUnloadImage_shim(PPCContext* ppc_context, hmodule); if (--ldr_data->load_count == 0) { // No more references, free it. + module->Release(); kernel_state->object_table()->RemoveHandle(module->handle()); } }