Author: aandrejevic
Date: Mon Apr 13 12:50:34 2015
New Revision: 67186
URL: http://svn.reactos.org/svn/reactos?rev=67186&view=rev
Log:
[NTVDM]
Initialize the list of hooks before the call to NtAllocateVirtualMemory, to prevent crashes
in MemCleanup in case it fails.
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/memory.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/memory.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/memo…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/memory.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/memory.c [iso-8859-1] Mon Apr 13 12:50:34 2015
@@ -583,6 +583,8 @@
NTSTATUS Status;
SIZE_T MemorySize = MAX_ADDRESS; // See: kernel32/client/vdm.c!BaseGetVdmConfigInfo
+ InitializeListHead(&HookList);
+
#ifndef STANDALONE
/*
@@ -626,8 +628,6 @@
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