mirror of
https://github.com/reactos/reactos.git
synced 2026-05-22 23:30:07 +08: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:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user