Fix: potential leaks in error paths
authorAntoine Busque <abusque@efficios.com>
Tue, 8 Sep 2015 21:33:18 +0000 (17:33 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 8 Sep 2015 22:27:44 +0000 (18:27 -0400)
Signed-off-by: Antoine Busque <abusque@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-elf.c

index ce58539e67880e853224a862c6aaed3ca6094b7a..4de380cf67d4edd803905e051ebde987bd90e683 100644 (file)
@@ -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;
 }
This page took 0.026893 seconds and 4 git commands to generate.