mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:MM] Fix memory leak in NtAllocateVirtualMemory
When an allocated VAD's insertion fails, the VAD is not freed. This commit attempts to fix this behaviour.
This commit is contained in:
parent
b60408c9f1
commit
d31642c712
1 changed files with 1 additions and 0 deletions
|
@ -4787,6 +4787,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
|||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to insert the VAD!\n");
|
||||
ExFreePoolWithTag(Vad, 'SdaV');
|
||||
goto FailPathNoLock;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue