2007-10-11 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Wed, 10 Oct 2007 23:00:10 +0000 (23:00 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 10 Oct 2007 23:00:10 +0000 (23:00 -0000)
* mono-mmap.c (mono_vfree): Fix call to VirtualFree (). Fixes #332165.

svn path=/trunk/mono/; revision=87305

mono/utils/ChangeLog
mono/utils/mono-mmap.c

index 51fef596122eb9d9b23503901c21d320cfe0b0e3..4ae621f1a42e3c61d267bfb3439ac7c0a7f24884 100644 (file)
@@ -1,3 +1,6 @@
+2007-10-11  Zoltan Varga  <vargaz@freemail.hu>
+
+       * mono-mmap.c (mono_vfree): Fix call to VirtualFree (). Fixes #332165.
 
 Mon Oct 8 11:47:44 CEST 2007 Paolo Molaro <lupus@ximian.com>
 
index 91bc0b6d90fc94f6441c8cb41709c27af7aa57f9..bd438cd2060c06d7597b391b7c27470f7204d3d2 100644 (file)
@@ -71,7 +71,11 @@ mono_valloc (void *addr, size_t length, int flags)
 int
 mono_vfree (void *addr, size_t length)
 {
-       return VirtualFree (addr, length, MEM_RELEASE) == 0;
+       int res = VirtualFree (addr, 0, MEM_RELEASE);
+
+       g_assert (res);
+
+       return 0;
 }
 
 void*