Skip to content

Commit

Permalink
dwarf: Close file descriptors in setup_dwarf_info()
Browse files Browse the repository at this point in the history
This defect was detected by Facebook's Infer tool https://github.com/facebook/infer

Signed-off-by: Ziming Zhou <[email protected]>
  • Loading branch information
ziming-zh authored and namhyung committed Apr 24, 2024
1 parent 427faa9 commit a26f9d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ static int setup_dwarf_info(const char *filename, struct uftrace_dbg_info *dinfo
dinfo->dwfl = dwfl_begin(&dwfl_callbacks);
if (dinfo->dwfl == NULL) {
pr_dbg2("failed to begin libdwfl: %s\n", dwfl_errmsg(dwfl_errno()));
close(fd);
return -1;
}

Expand Down

0 comments on commit a26f9d6

Please sign in to comment.