Author: arty
Date: Wed Jun 6 21:22:19 2012
New Revision: 56701
URL:
http://svn.reactos.org/svn/reactos?rev=56701&view=rev
Log:
[NTOSKRNL]
Don't crash when unmapping a kernel-space image section, due to dereferencing a NULL
Process.
Modified:
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Wed Jun 6 21:22:19 2012
@@ -4105,7 +4105,7 @@
ASSERT(Process);
- AddressSpace = &Process->Vm;
+ AddressSpace = Process ? &Process->Vm : MmGetKernelAddressSpace();
MmLockAddressSpace(AddressSpace);
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,