Moved position of ObfDereferenceObject in NtSuspendThread
This commit is contained in:
parent
750d202fa8
commit
1b4a3bb54f
|
@ -2098,13 +2098,11 @@ XBSYSAPI EXPORTNUM(231) xbox::ntstatus_xt NTAPI xbox::NtSuspendThread
|
|||
}
|
||||
|
||||
ulong_xt PrevSuspendCount = KeSuspendThread(&Thread->Tcb);
|
||||
ObfDereferenceObject(Thread);
|
||||
if (PrevSuspendCount == X_STATUS_SUSPEND_COUNT_EXCEEDED) {
|
||||
ObfDereferenceObject(Thread);
|
||||
RETURN(X_STATUS_SUSPEND_COUNT_EXCEEDED);
|
||||
}
|
||||
|
||||
ObfDereferenceObject(Thread);
|
||||
|
||||
if (PreviousSuspendCount) {
|
||||
*PreviousSuspendCount = PrevSuspendCount;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue