mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 08:30:21 +00:00
[CSRSRV] CsrGetProcessLuid(): Check 1st NtQueryInformationToken() result too (#2857)
Detected by Cppcheck: redundantAssignment. Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
This commit is contained in:
parent
d59d74fb69
commit
8fde48b5d7
1 changed files with 6 additions and 0 deletions
|
@ -873,6 +873,12 @@ CsrGetProcessLuid(IN HANDLE hProcess OPTIONAL,
|
|||
NULL,
|
||||
0,
|
||||
&Length);
|
||||
if (Status != STATUS_BUFFER_TOO_SMALL)
|
||||
{
|
||||
/* Close the token and fail */
|
||||
NtClose(hToken);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* Allocate memory for the Token Info */
|
||||
if (!(TokenStats = RtlAllocateHeap(CsrHeap, 0, Length)))
|
||||
|
|
Loading…
Reference in a new issue