only return the token handle if creating it succeeded

svn path=/trunk/; revision=14316
This commit is contained in:
Thomas Bluemel 2005-03-25 18:13:31 +00:00
parent e11896f814
commit 71cda6ad2a

View file

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