[NTOSKRNL]

- Fix another case where we fail to detach from a process before failing

svn path=/trunk/; revision=54394
This commit is contained in:
Cameron Gutman 2011-11-16 00:11:10 +00:00
parent 800384214e
commit 846509e433

View file

@ -158,7 +158,12 @@ MiLoadImageSection(IN OUT PVOID *SectionPtr,
/* 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;