From 5c1e6cd9ac8fb3998f1c47dac4a2e5f880951117 Mon Sep 17 00:00:00 2001 From: Aleksandar Andrejevic Date: Mon, 13 Apr 2015 12:50:34 +0000 Subject: [PATCH] [NTVDM] Initialize the list of hooks before the call to NtAllocateVirtualMemory, to prevent crashes in MemCleanup in case it fails. svn path=/trunk/; revision=67186 --- reactos/subsystems/mvdm/ntvdm/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/subsystems/mvdm/ntvdm/memory.c b/reactos/subsystems/mvdm/ntvdm/memory.c index 7bbe7c956be..f5cb23aba40 100644 --- a/reactos/subsystems/mvdm/ntvdm/memory.c +++ b/reactos/subsystems/mvdm/ntvdm/memory.c @@ -583,6 +583,8 @@ MemInitialize(VOID) NTSTATUS Status; SIZE_T MemorySize = MAX_ADDRESS; // See: kernel32/client/vdm.c!BaseGetVdmConfigInfo + InitializeListHead(&HookList); + #ifndef STANDALONE /* @@ -626,8 +628,6 @@ MemInitialize(VOID) ASSERT(BaseAddress == NULL); #endif - InitializeListHead(&HookList); - /* * For diagnostics purposes, we fill the memory with INT 0x03 codes * so that if a program wants to execute random code in memory, we can