From 68a77ac950a0cda6649835b0244ab6015f2b2a06 Mon Sep 17 00:00:00 2001 From: plutooo Date: Tue, 28 Aug 2018 21:29:55 +0200 Subject: [PATCH] Close sm session properly --- nx/source/services/sm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nx/source/services/sm.c b/nx/source/services/sm.c index 43c71ca1..487abcdc 100644 --- a/nx/source/services/sm.c +++ b/nx/source/services/sm.c @@ -99,7 +99,9 @@ Result smInitialize(void) void smExit(void) { - if (atomicDecrement64(&g_refCnt) == 0) { + if (atomicDecrement64(&g_refCnt) == 0) + { + ipcCloseSession(g_smHandle); svcCloseHandle(g_smHandle); g_smHandle = INVALID_HANDLE; }