From 9cafa059bd07cf30e45db7b9c0541b7038c5c24c Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Mon, 18 Apr 2005 04:55:48 +0000 Subject: [PATCH] Fix Process not being deleted svn path=/trunk/; revision=14664 --- reactos/ntoskrnl/mm/mm.c | 1 + reactos/ntoskrnl/ps/kill.c | 2 +- reactos/ntoskrnl/ps/process.c | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/mm/mm.c b/reactos/ntoskrnl/mm/mm.c index 451df5db524..91f7c533795 100644 --- a/reactos/ntoskrnl/mm/mm.c +++ b/reactos/ntoskrnl/mm/mm.c @@ -90,6 +90,7 @@ NTSTATUS MmReleaseMemoryArea(PEPROCESS Process, PMEMORY_AREA Marea) return(STATUS_SUCCESS); case MEMORY_AREA_VIRTUAL_MEMORY: + case MEMORY_AREA_PEB_OR_TEB: MmFreeVirtualMemory(Process, Marea); break; diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index 0c3392c18ba..5249024b9e8 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -151,7 +151,7 @@ PspDeleteProcess(PVOID ObjectBody) { PEPROCESS Process = (PEPROCESS)ObjectBody; - DPRINT("PiDeleteProcess(ObjectBody %x)\n",Process); + DPRINT1("PiDeleteProcess(ObjectBody %x)\n",Process); /* Delete the CID Handle */ if(Process->UniqueProcessId != NULL) { diff --git a/reactos/ntoskrnl/ps/process.c b/reactos/ntoskrnl/ps/process.c index e12a8e8fd17..baf9b222381 100644 --- a/reactos/ntoskrnl/ps/process.c +++ b/reactos/ntoskrnl/ps/process.c @@ -427,9 +427,8 @@ PspCreateProcess(OUT PHANDLE ProcessHandle, /* FIXME: ObGetObjectSecurity(Process, &SecurityDescriptor) SeAccessCheck */ - ObReferenceObject(Process); - ObReferenceObject(Process); - return Status; + ObDereferenceObject(Process); + return Status; exitdereferenceobjects: if(SectionObject != NULL) ObDereferenceObject(SectionObject);