Do always dereference the section object if it was created (in PspCreateProcess).
Modified: trunk/reactos/ntoskrnl/ps/process.c

Modified: trunk/reactos/ntoskrnl/ps/process.c
--- trunk/reactos/ntoskrnl/ps/process.c	2005-10-31 01:22:19 UTC (rev 18908)
+++ trunk/reactos/ntoskrnl/ps/process.c	2005-10-31 08:02:49 UTC (rev 18909)
@@ -436,9 +436,9 @@
 
 Cleanup:
     if(pParentProcess != NULL) ObDereferenceObject(pParentProcess);
+    if(SectionObject != NULL) ObDereferenceObject(SectionObject);
     if (!ProcessCreated)
     {
-        if(SectionObject != NULL) ObDereferenceObject(SectionObject);
         if(pExceptionPort != NULL) ObDereferenceObject(pExceptionPort);
         if(pDebugPort != NULL) ObDereferenceObject(pDebugPort);
         if(Process != NULL) ObDereferenceObject(Process);