* Plug a leak. CID 1206903.
CORE-7975

svn path=/trunk/; revision=63651
This commit is contained in:
Amine Khaldi 2014-06-28 09:52:56 +00:00
parent f4ec38eedf
commit b4ccb18968

View file

@ -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);
}
}