release the keep-alive reference of the process object
[reactos.git] / reactos / ntoskrnl / ps / kill.c
index 7cb6764..6e4b8a7 100644 (file)
@@ -524,6 +524,9 @@ PspExitProcess(PEPROCESS Process)
     ObKillProcess(Process);
 
     KeSetProcess(&Process->Pcb, IO_NO_INCREMENT);
+    
+    /* release the keep-alive reference of the process object */
+    ObDereferenceObject(Process);
 
     return(STATUS_SUCCESS);
 }