]> git.lttng.org Git - lttng-tools.git/commitdiff
Fix: lttng-elf: wrong error label used by error path
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Mar 2022 14:58:03 +0000 (10:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 18 Mar 2022 14:59:35 +0000 (10:59 -0400)
1486805 Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource.

In lttng_elf_get_symbol_offset: Leak of memory or pointers to system resources (CWE-404)

Reported-by: Coverity Scan
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I78b868773b389c2eaf3f1d45151fe9416b1fe447

src/common/lttng-elf.c

index 7369f29c517cd9489d78ab2bfc9bd7756c0f90f9..08eb5a64cc8fbfb5818682c9e48babc93bac4af6 100644 (file)
@@ -817,7 +817,7 @@ int lttng_elf_get_symbol_offset(int fd, char *symbol, uint64_t *offset)
        if (symtab_hdr.sh_entsize == 0) {
                DBG("Invalid ELF string table entry size.");
                ret = LTTNG_ERR_ELF_PARSING;
-               goto free_symbol_table_data;
+               goto free_string_table_data;
        }
 
        sym_count = symtab_hdr.sh_size / symtab_hdr.sh_entsize;
This page took 0.030988 seconds and 4 git commands to generate.