mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-21 06:05:55 -04:00
fixed memory leak (VirtualFree must be called with zero size when releasing memory)
This commit is contained in:
+1
-1
@@ -460,7 +460,7 @@ void MemoryFreeLibrary(HMEMORYMODULE mod)
|
||||
|
||||
if (module->codeBase != NULL)
|
||||
// release memory of library
|
||||
VirtualFree(module->codeBase, module->headers->OptionalHeader.SizeOfImage, MEM_RELEASE);
|
||||
VirtualFree(module->codeBase, 0, MEM_RELEASE);
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, module);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user