mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +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,15 +82,18 @@ NtOpenProcessTokenEx(IN HANDLE ProcessHandle,
|
|||
&hToken);
|
||||
ObDereferenceObject(Token);
|
||||
|
||||
_SEH_TRY
|
||||
if(NT_SUCCESS(Status))
|
||||
{
|
||||
*TokenHandle = hToken;
|
||||
_SEH_TRY
|
||||
{
|
||||
*TokenHandle = hToken;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
}
|
||||
_SEH_HANDLE
|
||||
{
|
||||
Status = _SEH_GetExceptionCode();
|
||||
}
|
||||
_SEH_END;
|
||||
}
|
||||
|
||||
return Status;
|
||||
|
|
Loading…
Reference in a new issue