Author: cgutman
Date: Wed Nov 16 00:11:10 2011
New Revision: 54394
URL:
http://svn.reactos.org/svn/reactos?rev=54394&view=rev
Log:
[NTOSKRNL]
- Fix another case where we fail to detach from a process before failing
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Wed Nov 16 00:11:10 2011
@@ -158,7 +158,12 @@
/* Reserve system PTEs needed */
PteCount = ROUND_TO_PAGES(Section->ImageSection->ImageSize) >>
PAGE_SHIFT;
PointerPte = MiReserveSystemPtes(PteCount, SystemPteSpace);
- if (!PointerPte) return STATUS_INSUFFICIENT_RESOURCES;
+ if (!PointerPte)
+ {
+ DPRINT1("MiReserveSystemPtes failed\n");
+ KeUnstackDetachProcess(&ApcState);
+ return STATUS_INSUFFICIENT_RESOURCES;
+ }
/* New driver base */
LastPte = PointerPte + PteCount;