about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-09-11 19:14:13 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-09-11 19:14:13 +0000
commitced3570bd1bc8cc40c1be1592f39699c66070015 (patch)
tree8666021b30514dddbebd72e46052fc1e2600887e
parente0f68fb5dd9282850afc3b3a017affe8d269e052 (diff)
downloadzsh-ced3570bd1bc8cc40c1be1592f39699c66070015.tar.gz
zsh-ced3570bd1bc8cc40c1be1592f39699c66070015.tar.xz
zsh-ced3570bd1bc8cc40c1be1592f39699c66070015.zip
25632: xRaich[o]²x: Src/mem.c: munmap() argument was wrong.
-rw-r--r--ChangeLog4
-rw-r--r--Src/mem.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ccee8d5c7..90334a472 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-11  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* 25632: xRaich[o]²x: Src/mem.c: munmap() argument was wrong.
+
 2008-09-11  Peter Stephenson  <pws@csr.com>
 
 	* 25651: Src/builtin.c, Src/exec.c, Src/hashtable.c, Src/init.c,
diff --git a/Src/mem.c b/Src/mem.c
index 88cd6247a..1a3e75997 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -153,9 +153,9 @@ old_heaps(Heap old)
 	n = h->next;
 	DPUTS(h->sp, "BUG: old_heaps() with pushed heaps");
 #ifdef USE_MMAP
-	munmap((void *) h, sizeof(*h));
+	munmap((void *) h, h->size);
 #else
-	zfree(h, sizeof(*h));
+	zfree(h, HEAPSIZE);
 #endif
     }
     heaps = old;