Skip to content

Commit

Permalink
perf probe: Fix to close dwarf when failing to analyze it
Browse files Browse the repository at this point in the history
Fix to close libdw routine when failing to analyze it in
find_perf_probe_point().

Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100402165059.23551.95587.stgit@localhost6.localdomain6>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Apr 2, 2010
1 parent 12e5a7a commit 75ec5a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/perf/util/probe-finder.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,10 @@ int find_perf_probe_point(int fd, unsigned long addr,
return -ENOENT;

/* Find cu die */
if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie))
return -EINVAL;
if (!dwarf_addrdie(dbg, (Dwarf_Addr)addr, &cudie)) {
ret = -EINVAL;
goto end;
}

/* Find a corresponding line */
line = dwarf_getsrc_die(&cudie, (Dwarf_Addr)addr);
Expand Down

0 comments on commit 75ec5a2

Please sign in to comment.