mirror of
https://github.com/reactos/reactos.git
synced 2026-06-09 01:12:59 +08: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:
committed by
George Bișoc
parent
b60408c9f1
commit
d31642c712
@@ -4787,6 +4787,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("Failed to insert the VAD!\n");
|
||||
ExFreePoolWithTag(Vad, 'SdaV');
|
||||
goto FailPathNoLock;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user