mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
only return the token handle if creating it succeeded
svn path=/trunk/; revision=14316
This commit is contained in:
parent
e11896f814
commit
71cda6ad2a
1 changed files with 10 additions and 7 deletions
|
@ -82,6 +82,8 @@ NtOpenProcessTokenEx(IN HANDLE ProcessHandle,
|
|||
&hToken);
|
||||
ObDereferenceObject(Token);
|
||||
|
||||
if(NT_SUCCESS(Status))
|
||||
{
|
||||
_SEH_TRY
|
||||
{
|
||||
*TokenHandle = hToken;
|
||||
|
@ -92,6 +94,7 @@ NtOpenProcessTokenEx(IN HANDLE ProcessHandle,
|
|||
}
|
||||
_SEH_END;
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue