From: Antoine Busque Date: Tue, 8 Sep 2015 21:33:18 +0000 (-0400) Subject: Fix: potential leaks in error paths X-Git-Tag: v2.8.0-rc1~80 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=99b7132dc75b5eb865f284fd1eca2bad77442187;p=lttng-ust.git Fix: potential leaks in error paths Signed-off-by: Antoine Busque Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-elf.c b/liblttng-ust/lttng-ust-elf.c index ce58539e..4de380cf 100644 --- a/liblttng-ust/lttng-ust-elf.c +++ b/liblttng-ust/lttng-ust-elf.c @@ -545,6 +545,7 @@ int lttng_ust_elf_get_build_id(struct lttng_ust_elf *elf, uint8_t **build_id, *found = _found; return 0; error: + free(_build_id); return -1; } @@ -681,5 +682,6 @@ int lttng_ust_elf_get_debug_link(struct lttng_ust_elf *elf, char **filename, *found = _found; return 0; error: + free(_filename); return -1; }