Do always dereference the section object if it was created (in PspCreateProcess).
authorHartmut Birr <osexpert@googlemail.com>
Mon, 31 Oct 2005 08:02:49 +0000 (08:02 +0000)
committerHartmut Birr <osexpert@googlemail.com>
Mon, 31 Oct 2005 08:02:49 +0000 (08:02 +0000)
svn path=/trunk/; revision=18909

reactos/ntoskrnl/ps/process.c

index 8240bf0..df3993d 100644 (file)
@@ -436,9 +436,9 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
 
 Cleanup:
     if(pParentProcess != NULL) ObDereferenceObject(pParentProcess);
 
 Cleanup:
     if(pParentProcess != NULL) ObDereferenceObject(pParentProcess);
+    if(SectionObject != NULL) ObDereferenceObject(SectionObject);
     if (!ProcessCreated)
     {
     if (!ProcessCreated)
     {
-        if(SectionObject != NULL) ObDereferenceObject(SectionObject);
         if(pExceptionPort != NULL) ObDereferenceObject(pExceptionPort);
         if(pDebugPort != NULL) ObDereferenceObject(pDebugPort);
         if(Process != NULL) ObDereferenceObject(Process);
         if(pExceptionPort != NULL) ObDereferenceObject(pExceptionPort);
         if(pDebugPort != NULL) ObDereferenceObject(pDebugPort);
         if(Process != NULL) ObDereferenceObject(Process);