mirror of
https://github.com/reactos/reactos.git
synced 2025-07-05 13:21:23 +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);
|
&hToken);
|
||||||
ObDereferenceObject(Token);
|
ObDereferenceObject(Token);
|
||||||
|
|
||||||
|
if(NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
*TokenHandle = hToken;
|
*TokenHandle = hToken;
|
||||||
|
@ -92,6 +94,7 @@ NtOpenProcessTokenEx(IN HANDLE ProcessHandle,
|
||||||
}
|
}
|
||||||
_SEH_END;
|
_SEH_END;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue