summaryrefslogtreecommitdiff
path: root/libc/stdlib/__uc_malloc.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-05-10 20:09:36 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-05-10 20:09:36 +0200
commit025ec197fe9d069c6d705e6f7d1509bb9dc1ce56 (patch)
treea23b4755e593b4ec03ce8f70b91be4568cdb237e /libc/stdlib/__uc_malloc.c
parent974d3140577ac740c8db2f1ad9635c4ba591361e (diff)
__uc_malloc: Fix memory-leak in error path
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/stdlib/__uc_malloc.c')
-rw-r--r--libc/stdlib/__uc_malloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/stdlib/__uc_malloc.c b/libc/stdlib/__uc_malloc.c
index 2a2e223ef..449f014fc 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);
}
}