X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=liblttng-ust-dl%2Flttng-ust-dl.c;h=954d9dfcb7381025e82054b110a525ae5855e717;hb=d6792eab0e93399a26c6bea6d337ab4df1b95374;hp=d6b807149861415e30212a5ca72100dfef8db4c7;hpb=8e2aed3f18adc14ec586ef717e396bcac4473dd7;p=lttng-ust.git diff --git a/liblttng-ust-dl/lttng-ust-dl.c b/liblttng-ust-dl/lttng-ust-dl.c index d6b80714..954d9dfc 100644 --- a/liblttng-ust-dl/lttng-ust-dl.c +++ b/liblttng-ust-dl/lttng-ust-dl.c @@ -70,9 +70,9 @@ void lttng_ust_dl_dlopen(void *so_base, const char *so_name, void *ip) char resolved_path[PATH_MAX]; struct lttng_ust_elf *elf; uint64_t memsz; - uint8_t *build_id; + uint8_t *build_id = NULL; size_t build_id_len; - char *dbg_file; + char *dbg_file = NULL; uint32_t crc; int has_build_id = 0, has_debug_link = 0; int ret; @@ -109,16 +109,16 @@ void lttng_ust_dl_dlopen(void *so_base, const char *so_name, void *ip) if (has_build_id) { tracepoint(lttng_ust_dl, build_id, ip, so_base, build_id, build_id_len); - free(build_id); } if (has_debug_link) { tracepoint(lttng_ust_dl, debug_link, ip, so_base, dbg_file, crc); - free(dbg_file); } end: + free(dbg_file); + free(build_id); lttng_ust_elf_destroy(elf); return; }