mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 12:23:31 +00:00
[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user