From e39b696116dee0ae3e588693ecac6f78810e404e Mon Sep 17 00:00:00 2001 From: Art Yerkes Date: Wed, 6 Jun 2012 21:22:19 +0000 Subject: [PATCH] [NTOSKRNL] Don't crash when unmapping a kernel-space image section, due to dereferencing a NULL Process. svn path=/trunk/; revision=56701 --- reactos/ntoskrnl/mm/section.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 2fb1f4ca674..a974e9be25d 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -4105,7 +4105,7 @@ MiRosUnmapViewOfSection(IN PEPROCESS Process, ASSERT(Process); - AddressSpace = &Process->Vm; + AddressSpace = Process ? &Process->Vm : MmGetKernelAddressSpace(); MmLockAddressSpace(AddressSpace); MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,