From: smea Date: Wed, 8 Jul 2015 02:52:18 +0000 (-0700) Subject: socMemhandle should be closed even if shutdown command fails X-Git-Tag: v0.6.0~28 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=9fac0a0ea11f50e904f682310f589e9fd244f7e6;p=corbenik%2Fctrulib.git socMemhandle should be closed even if shutdown command fails --- diff --git a/libctru/source/services/soc/soc_init.c b/libctru/source/services/soc/soc_init.c index 9f5a88f..a1b081b 100644 --- a/libctru/source/services/soc/soc_init.c +++ b/libctru/source/services/soc/soc_init.c @@ -98,6 +98,8 @@ Result SOC_Shutdown(void) Result ret = 0; u32 *cmdbuf = getThreadCommandBuffer(); int dev; + + svcCloseHandle(socMemhandle); cmdbuf[0] = 0x00190000; @@ -108,7 +110,6 @@ Result SOC_Shutdown(void) } svcCloseHandle(SOCU_handle); - svcCloseHandle(socMemhandle); dev = FindDevice("soc:"); if(dev >= 0)