Author: akhaldi Date: Sat Jun 28 09:52:56 2014 New Revision: 63651
URL: http://svn.reactos.org/svn/reactos?rev=63651&view=rev Log: [DEVMGR] * Plug a leak. CID 1206903. CORE-7975
Modified: trunk/reactos/dll/win32/devmgr/advprop.c
Modified: trunk/reactos/dll/win32/devmgr/advprop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/advprop.c?... ============================================================================== --- trunk/reactos/dll/win32/devmgr/advprop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/advprop.c [iso-8859-1] Sat Jun 28 09:52:56 2014 @@ -448,6 +448,7 @@ if (!LookupPrivilegeValueW(NULL, SE_SHUTDOWN_NAME, &Privileges.Privileges[0].Luid)) { DPRINT("LookupPrivilegeValue failed\n"); + CloseHandle(hToken); return; }
@@ -458,6 +459,7 @@ if (!AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL)) { DPRINT("AdjustTokenPrivileges failed\n"); + CloseHandle(hToken); return; }
@@ -465,6 +467,7 @@ if (!ExitWindowsEx(EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED)) { DPRINT("ExitWindowsEx failed\n"); + CloseHandle(hToken); } }