From dad4f9848796b54389c0b0ba01b3d035d9e1f6cf Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Mon, 31 Oct 2005 08:02:49 +0000 Subject: [PATCH] Do always dereference the section object if it was created (in PspCreateProcess). svn path=/trunk/; revision=18909 --- reactos/ntoskrnl/ps/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.17.1