socMemhandle should be closed even if shutdown command fails

This commit is contained in:
smea 2015-07-07 19:52:18 -07:00
parent e9651a2869
commit 9fac0a0ea1

View File

@ -98,6 +98,8 @@ Result SOC_Shutdown(void)
Result ret = 0; Result ret = 0;
u32 *cmdbuf = getThreadCommandBuffer(); u32 *cmdbuf = getThreadCommandBuffer();
int dev; int dev;
svcCloseHandle(socMemhandle);
cmdbuf[0] = 0x00190000; cmdbuf[0] = 0x00190000;
@ -108,7 +110,6 @@ Result SOC_Shutdown(void)
} }
svcCloseHandle(SOCU_handle); svcCloseHandle(SOCU_handle);
svcCloseHandle(socMemhandle);
dev = FindDevice("soc:"); dev = FindDevice("soc:");
if(dev >= 0) if(dev >= 0)