From: Hartmut Birr Date: Mon, 31 Oct 2005 08:02:49 +0000 (+0000) Subject: Do always dereference the section object if it was created (in PspCreateProcess). X-Git-Tag: backups/ros-branch-0_2_9@19949~976 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=dad4f9848796b54389c0b0ba01b3d035d9e1f6cf;ds=sidebyside Do always dereference the section object if it was created (in PspCreateProcess). svn path=/trunk/; revision=18909 --- diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index 8240bf01990..df3993d1d4e 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -436,9 +436,9 @@ PspCreateProcess(OUT PHANDLE ProcessHandle, 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);