[ros-diffs] [hbirr] 14187: Added two missing dereferencing calls in NtTerminateThread.

hbirr at svn.reactos.com hbirr at svn.reactos.com
Sat Mar 19 10:14:23 CET 2005


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 */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050319/aeda81e5/attachment.html


More information about the Ros-diffs mailing list