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);