[git commit] __uc_malloc: Fix memory-leak in error path
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Tue May 10 19:22:25 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=025ec197fe9d069c6d705e6f7d1509bb9dc1ce56
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
libc/stdlib/__uc_malloc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libc/stdlib/__uc_malloc.c b/libc/stdlib/__uc_malloc.c
index 2a2e223..449f014 100644
--- a/libc/stdlib/__uc_malloc.c
+++ b/libc/stdlib/__uc_malloc.c
@@ -39,6 +39,7 @@ void *__uc_malloc(size_t size)
return p;
if (!__uc_malloc_failed)
_exit(1);
+ free(p);
__uc_malloc_failed(size);
}
}
--
1.7.3.4
More information about the uClibc-cvs
mailing list