mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[DEVMGR]
* Plug a leak. CID 1206903. CORE-7975 svn path=/trunk/; revision=63651
This commit is contained in:
parent
f4ec38eedf
commit
b4ccb18968
1 changed files with 3 additions and 0 deletions
|
@ -448,6 +448,7 @@ UpdateDriver(
|
|||
if (!LookupPrivilegeValueW(NULL, SE_SHUTDOWN_NAME, &Privileges.Privileges[0].Luid))
|
||||
{
|
||||
DPRINT("LookupPrivilegeValue failed\n");
|
||||
CloseHandle(hToken);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -458,6 +459,7 @@ UpdateDriver(
|
|||
if (!AdjustTokenPrivileges(hToken, FALSE, &Privileges, 0, NULL, NULL))
|
||||
{
|
||||
DPRINT("AdjustTokenPrivileges failed\n");
|
||||
CloseHandle(hToken);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -465,6 +467,7 @@ UpdateDriver(
|
|||
if (!ExitWindowsEx(EWX_REBOOT, SHTDN_REASON_MAJOR_OTHER | SHTDN_REASON_MINOR_OTHER | SHTDN_REASON_FLAG_PLANNED))
|
||||
{
|
||||
DPRINT("ExitWindowsEx failed\n");
|
||||
CloseHandle(hToken);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue