diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-07-10 04:09:18 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-07-10 04:09:18 +0000 |
commit | 6c00b5de9cdd90782b2f66c9683e464c4adfdb03 (patch) | |
tree | 823463f22b6e635a684cd6cce8f8c43a156be5d6 /libc/stdlib | |
parent | 8b1bfb536ae86b4c6810c60b24e1ff8a8664bb6b (diff) |
Patch from Ronald Wahl <rwa@peppercon.com> to fix a memory leak
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/malloc-simple/alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |