Fix: Free die_name in bin_info_lookup_cu_function_name
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 17 May 2016 19:21:44 +0000 (15:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 30 May 2016 06:00:24 +0000 (02:00 -0400)
Fixes coverity #1354905

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
lib/bin-info.c

index 42c426807f4b0f20b30c9686b094adb05e7afed3..55808eb0abb0675f5e9c809b53975597965a6252 100644 (file)
@@ -830,11 +830,13 @@ int bin_info_lookup_cu_function_name(struct bt_dwarf_cu *cu, uint64_t addr,
 
                ret = dwarf_lowpc(die->dwarf_die, &low_addr);
                if (ret) {
+                       free(die_name);
                        goto error;
                }
 
                ret = bin_info_append_offset_str(die_name, low_addr, addr,
                                                func_name);
+               free(die_name);
                if (ret) {
                        goto error;
                }
This page took 0.032955 seconds and 4 git commands to generate.