Initialize the list of hooks before the call to NtAllocateVirtualMemory, to prevent crashes
in MemCleanup in case it fails.


svn path=/trunk/; revision=67186
This commit is contained in:
Aleksandar Andrejevic 2015-04-13 12:50:34 +00:00
parent 979022ff03
commit 5c1e6cd9ac

View file

@ -583,6 +583,8 @@ MemInitialize(VOID)
NTSTATUS Status; NTSTATUS Status;
SIZE_T MemorySize = MAX_ADDRESS; // See: kernel32/client/vdm.c!BaseGetVdmConfigInfo SIZE_T MemorySize = MAX_ADDRESS; // See: kernel32/client/vdm.c!BaseGetVdmConfigInfo
InitializeListHead(&HookList);
#ifndef STANDALONE #ifndef STANDALONE
/* /*
@ -626,8 +628,6 @@ MemInitialize(VOID)
ASSERT(BaseAddress == NULL); ASSERT(BaseAddress == NULL);
#endif #endif
InitializeListHead(&HookList);
/* /*
* For diagnostics purposes, we fill the memory with INT 0x03 codes * 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 * so that if a program wants to execute random code in memory, we can