mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[NTOS:PS] Fix misplaced Thread variable reference caught by RTC
Addendum to 2e88e2b9
.
This commit is contained in:
parent
2b52f3bb56
commit
0c8f07854b
1 changed files with 8 additions and 8 deletions
|
@ -2454,14 +2454,6 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
|
|||
}
|
||||
_SEH2_END;
|
||||
|
||||
/* This is only valid for the current thread */
|
||||
if (Thread != PsGetCurrentThread())
|
||||
{
|
||||
/* Fail */
|
||||
Status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Reference the thread */
|
||||
Status = ObReferenceObjectByHandle(ThreadHandle,
|
||||
THREAD_SET_INFORMATION,
|
||||
|
@ -2472,6 +2464,14 @@ NtSetInformationThread(IN HANDLE ThreadHandle,
|
|||
if (!NT_SUCCESS(Status))
|
||||
break;
|
||||
|
||||
/* This is only valid for the current thread */
|
||||
if (Thread != PsGetCurrentThread())
|
||||
{
|
||||
/* Fail */
|
||||
Status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Get the process */
|
||||
Process = Thread->ThreadsProcess;
|
||||
|
||||
|
|
Loading…
Reference in a new issue