[ros-diffs] [cgutman] 54394: [NTOSKRNL] - Fix another case where we fail to detach from a process before failing

cgutman at svn.reactos.org cgutman at svn.reactos.org
Wed Nov 16 00:11:10 UTC 2011


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?rev=54394&r1=54393&r2=54394&view=diff
==============================================================================
--- 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;




More information about the Ros-diffs mailing list