From 6c00b5de9cdd90782b2f66c9683e464c4adfdb03 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 10 Jul 2002 04:09:18 +0000 Subject: Patch from Ronald Wahl to fix a memory leak --- libc/stdlib/malloc-simple/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/stdlib') diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c index b6a3cfcb6..1824507eb 100644 --- a/libc/stdlib/malloc-simple/alloc.c +++ b/libc/stdlib/malloc-simple/alloc.c @@ -107,7 +107,7 @@ void free(void *ptr) #ifdef __UCLIBC_HAS_MMU__ if (ptr) { ptr -= sizeof(size_t); - munmap(ptr, * (size_t *) ptr); + munmap(ptr, * (size_t *) ptr + sizeof(size_t)); } #else munmap(ptr, 0); -- cgit v1.2.3