Skip to content

Commit

Permalink
* Fix memory leak in win32 VM code (arQon/dmitry)
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Aug 6, 2008
1 parent 1b87aff commit 9a5d971
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion code/qcommon/vm_x86.c
Expand Up @@ -1123,7 +1123,7 @@ void VM_Destroy_Compiled(vm_t* self)
#ifdef VM_X86_MMAP
munmap(self->codeBase, self->codeLength);
#elif _WIN32
VirtualFree(self->codeBase, self->codeLength, MEM_RELEASE);
VirtualFree(self->codeBase, 0, MEM_RELEASE);
#else
free(self->codeBase);
#endif
Expand Down
2 changes: 1 addition & 1 deletion code/qcommon/vm_x86_64.c
Expand Up @@ -1040,7 +1040,7 @@ void VM_Destroy_Compiled(vm_t* self)
#ifdef USE_GAS
munmap(self->codeBase, self->codeLength);
#elif _WIN32
VirtualFree(self->codeBase, self->codeLength, MEM_RELEASE);
VirtualFree(self->codeBase, 0, MEM_RELEASE);
#else
munmap(self->codeBase, self->codeLength);
#endif
Expand Down

0 comments on commit 9a5d971

Please sign in to comment.