Added two missing dereferencing calls in NtTerminateThread. Modified: trunk/reactos/ntoskrnl/ps/kill.c _____
Modified: trunk/reactos/ntoskrnl/ps/kill.c --- trunk/reactos/ntoskrnl/ps/kill.c 2005-03-19 02:18:49 UTC (rev 14186) +++ trunk/reactos/ntoskrnl/ps/kill.c 2005-03-19 09:14:21 UTC (rev 14187) @@ -473,6 +473,7 @@
if (PsIsSystemThread(Thread)) {
DPRINT1("Trying to Terminate a system thread!\n"); + ObDereferenceObject(Thread); return STATUS_INVALID_PARAMETER; }
@@ -490,9 +491,11 @@ }
} else { + ObDereferenceObject(Thread);
/* Terminate him, he's ours */ PspExitThread(ExitStatus); + /* We do never reach this point */ }
/* Dereference the Thread and return */