[NTOSKRNL]: Don't assert if there's no VAD found in NtFreeVirtualMemory... perhaps a wrong address was used on purpose (such as during a Winetest). Simply do what ROS does when a MAREA is not found and return failure. However if a VAD *was* found, keep all the other ASSERTs...

svn path=/trunk/; revision=55886
This commit is contained in:
Alex Ionescu 2012-02-27 17:17:31 +00:00
parent 7b2b759953
commit c61e296b73

View file

@ -1149,6 +1149,12 @@ NtFreeVirtualMemory(IN HANDLE ProcessHandle,
StartingAddress = (ULONG_PTR)PAGE_ALIGN(PBaseAddress);
EndingAddress = ((ULONG_PTR)PBaseAddress + PRegionSize - 1) | (PAGE_SIZE - 1);
Vad = MiLocateAddress((PVOID)StartingAddress);
if (!Vad)
{
DPRINT1("Unable to VAD for address 0x%p\n", BaseAddress);
Status = STATUS_UNABLE_TO_FREE_VM;
goto unlock_deref_and_return;
}
/* This is the kind of VAD we expect right now */
ASSERT(Vad);