mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-20 21:59:45 -04:00
Call "VirtualFree" before setting error (fixes #23).
This commit is contained in:
+1
-1
@@ -498,8 +498,8 @@ HMEMORYMODULE MemoryLoadLibraryEx(const void *data,
|
||||
|
||||
result = (PMEMORYMODULE)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MEMORYMODULE));
|
||||
if (result == NULL) {
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
VirtualFree(code, 0, MEM_RELEASE);
|
||||
SetLastError(ERROR_OUTOFMEMORY);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user