Author: mjmartin
Date: Fri Sep 24 15:27:24 2010
New Revision: 48859

URL: http://svn.reactos.org/svn/reactos?rev=48859&view=rev
Log:
[ntoskrnl/ps]
- Revert r48857. The Process object is dereferenced when the Thread object is 
destroyed, so dont dereference it here.

Modified:
    trunk/reactos/ntoskrnl/ps/thread.c

Modified: trunk/reactos/ntoskrnl/ps/thread.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/thread.c?rev=48859&r1=48858&r2=48859&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/thread.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/thread.c [iso-8859-1] Fri Sep 24 15:27:24 2010
@@ -280,7 +280,6 @@
     {
         /* We couldn't create the CID, dereference the thread and fail */
         ObDereferenceObject(Thread);
-        ObDereferenceObject(Process);
         return STATUS_INSUFFICIENT_RESOURCES;
     }
 
@@ -302,7 +301,6 @@
     {
         /* Fail */
         ObDereferenceObject(Thread);
-        ObDereferenceObject(Process);
         return STATUS_PROCESS_IS_TERMINATING;
     }
 
@@ -316,7 +314,6 @@
             /* Failed to create the TEB. Release rundown and dereference */
             ExReleaseRundownProtection(&Process->RundownProtect);
             ObDereferenceObject(Thread);
-            ObDereferenceObject(Process);
             return Status;
         }
 
@@ -360,7 +357,6 @@
         /* Release rundown and dereference */
         ExReleaseRundownProtection(&Process->RundownProtect);
         ObDereferenceObject(Thread);
-        ObDereferenceObject(Process);
         return Status;
     }
 
@@ -435,7 +431,6 @@
 
         /* Dereference completely to kill it */
         ObDereferenceObjectEx(Thread, 2);
-        ObDereferenceObject(Process);
         return Status;
     }
 
@@ -518,7 +513,6 @@
 
             /* Close its handle, killing it */
             ObCloseHandle(ThreadHandle, PreviousMode);
-            ObDereferenceObject(Process);
             return Status;
         }
 


Reply via email to