about summary refs log tree commit diff
path: root/Src/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/mem.c')
-rw-r--r--Src/mem.c4
1 files changed, 2 insertions, 2 deletions
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;