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,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;