mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +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:
parent
7b2b759953
commit
c61e296b73
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue