Task #130844 - fixed.err

back to task #130844
download
Error: GCC_ANALYZER_WARNING (CWE-401):
elfutils-0.194/libdw/dwarf_getcfi_elf.c:282:7: warning[-Wanalyzer-malloc-leak]: leak of ‘getcfi_shdr(elf,  gelf_getehdr(elf, & ehdr_mem))’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:316:1: enter_function: entry to ‘dwarf_getcfi_elf’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:318:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:325:21: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getcfi_elf.c:326:6: branch_false: following ‘false’ branch...
elfutils-0.194/libdw/dwarf_getcfi_elf.c:332:23: branch_false: ...to here
elfutils-0.194/libdw/dwarf_getcfi_elf.c:332:23: call_function: calling ‘getcfi_shdr’ from ‘dwarf_getcfi_elf’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:332:23: return_function: returning to ‘dwarf_getcfi_elf’ from ‘getcfi_shdr’
elfutils-0.194/libdw/dwarf_getcfi_elf.c:282:7: danger: ‘getcfi_shdr(elf,  gelf_getehdr(elf, & ehdr_mem))’ leaks here; was allocated at [(22)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/21)
#  280|       }
#  281|   
#  282|->   if (shstrndx != 0)
#  283|       {
#  284|         Elf_Scn *hdr_scn = NULL;