https://git.reactos.org/?p=reactos.git;a=commitdiff;h=561b71b644d93bafc6f000...
commit 561b71b644d93bafc6f0004dcfe89d2409dfb530 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Mon Aug 15 15:53:44 2022 +0300 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Thu Dec 1 20:17:40 2022 +0200
[NTOS] Improve MmDeleteProcessAddressSpace --- ntoskrnl/mm/ARM3/procsup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index 7e314129eed..c1c28af18c6 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -1379,7 +1379,8 @@ MmDeleteProcessAddressSpace(IN PEPROCESS Process)
/* Remove us from the list */ OldIrql = MiAcquireExpansionLock(); - RemoveEntryList(&Process->Vm.WorkingSetExpansionLinks); + if (Process->Vm.WorkingSetExpansionLinks.Flink != NULL) + RemoveEntryList(&Process->Vm.WorkingSetExpansionLinks); MiReleaseExpansionLock(OldIrql);
/* Acquire the PFN lock */ @@ -1421,8 +1422,8 @@ MmDeleteProcessAddressSpace(IN PEPROCESS Process) } else { - /* A partly-initialized process should never exit through here */ - ASSERT(FALSE); + DPRINT1("Deleting partially initialized address space of Process %p. Might leak resources.\n", + Process); }
/* Release the PFN lock */