mirror of
https://github.com/UberGames/ioef.git
synced 2024-12-11 05:11:29 +00:00
* Fix memory leak in win32 VM code (arQon/dmitry)
This commit is contained in:
parent
1b87aff448
commit
9a5d971705
2 changed files with 2 additions and 2 deletions
|
@ -1123,7 +1123,7 @@ void VM_Destroy_Compiled(vm_t* self)
|
||||||
#ifdef VM_X86_MMAP
|
#ifdef VM_X86_MMAP
|
||||||
munmap(self->codeBase, self->codeLength);
|
munmap(self->codeBase, self->codeLength);
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
VirtualFree(self->codeBase, self->codeLength, MEM_RELEASE);
|
VirtualFree(self->codeBase, 0, MEM_RELEASE);
|
||||||
#else
|
#else
|
||||||
free(self->codeBase);
|
free(self->codeBase);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ void VM_Destroy_Compiled(vm_t* self)
|
||||||
#ifdef USE_GAS
|
#ifdef USE_GAS
|
||||||
munmap(self->codeBase, self->codeLength);
|
munmap(self->codeBase, self->codeLength);
|
||||||
#elif _WIN32
|
#elif _WIN32
|
||||||
VirtualFree(self->codeBase, self->codeLength, MEM_RELEASE);
|
VirtualFree(self->codeBase, 0, MEM_RELEASE);
|
||||||
#else
|
#else
|
||||||
munmap(self->codeBase, self->codeLength);
|
munmap(self->codeBase, self->codeLength);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue