r1438 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Aug 6 12:09:30 EDT 2008


Author: tma
Date: 2008-08-06 12:09:29 -0400 (Wed, 06 Aug 2008)
New Revision: 1438

Modified:
   trunk/code/qcommon/vm_x86.c
   trunk/code/qcommon/vm_x86_64.c
Log:
* Fix memory leak in win32 VM code (arQon/dmitry)


Modified: trunk/code/qcommon/vm_x86.c
===================================================================
--- trunk/code/qcommon/vm_x86.c	2008-08-04 11:34:04 UTC (rev 1437)
+++ trunk/code/qcommon/vm_x86.c	2008-08-06 16:09:29 UTC (rev 1438)
@@ -1123,7 +1123,7 @@
 #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

Modified: trunk/code/qcommon/vm_x86_64.c
===================================================================
--- trunk/code/qcommon/vm_x86_64.c	2008-08-04 11:34:04 UTC (rev 1437)
+++ trunk/code/qcommon/vm_x86_64.c	2008-08-06 16:09:29 UTC (rev 1438)
@@ -1040,7 +1040,7 @@
 #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




More information about the quake3-commits mailing list