mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
little fix
svn path=/trunk/; revision=10495
This commit is contained in:
parent
05d68bd490
commit
2f6a9da97d
1 changed files with 6 additions and 1 deletions
|
@ -73,13 +73,18 @@ RosEnableThreadPrivileges(HANDLE *hPreviousToken,
|
|||
LocalFree((HLOCAL)privs);
|
||||
|
||||
/* Perform the impersonation */
|
||||
Ret = SetThreadToken(NULL, hToken);
|
||||
Ret = SetThreadToken(NULL, hNewToken);
|
||||
|
||||
if(Ret)
|
||||
{
|
||||
/* only copy the previous token handle on success */
|
||||
*hPreviousToken = hToken;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We don't return the previous token handle on failure, so close it here */
|
||||
CloseHandle(hToken);
|
||||
}
|
||||
|
||||
/* We don't need the handle to the new token anymore */
|
||||
CloseHandle(hNewToken);
|
||||
|
|
Loading…
Reference in a new issue