summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorAndré Goddard Rosa <andre.goddard@gmail.com>2010-02-05 16:01:05 -0200
committerAndré Goddard Rosa <andre.goddard@gmail.com>2010-03-29 21:21:26 -0300
commit350bb359fa5e31e3dfae8be6b1ce7ee3495f0da7 (patch)
tree7c927a543863b2e55cd920e343918fda1e91e448 /libc
parentf8916e2e4547da691b1de9149a23b9b254a4f7ad (diff)
downloadbionic-350bb359fa5e31e3dfae8be6b1ce7ee3495f0da7.zip
bionic-350bb359fa5e31e3dfae8be6b1ce7ee3495f0da7.tar.gz
bionic-350bb359fa5e31e3dfae8be6b1ce7ee3495f0da7.tar.bz2
bionic: fix memory leak in get_malloc_leak_info() error path
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/bionic/malloc_leak.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/bionic/malloc_leak.c b/libc/bionic/malloc_leak.c
index 06f99fb..9796382 100644
--- a/libc/bionic/malloc_leak.c
+++ b/libc/bionic/malloc_leak.c
@@ -198,7 +198,7 @@ void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
// debug_log("info = %p\n", info);
if (*info == NULL) {
*overallSize = 0;
- goto done;
+ goto out_nomem_info;
}
// debug_log("sorting list...\n");
@@ -220,6 +220,7 @@ void get_malloc_leak_info(uint8_t** info, size_t* overallSize,
head += *infoSize;
}
+out_nomem_info:
dlfree(list);
done: