Prev: [PATCH -tip 3/7] perf probe: Use the last field name as the argument name
Next: ARM mach-at91: duplicated include
From: Masami Hiramatsu on 29 Mar 2010 16:40 Fix to close libdw routine when failing to analyze it in find_perf_probe_point(). Signed-off-by: Masami Hiramatsu <mhiramat(a)redhat.com> Cc: Ingo Molnar <mingo(a)elte.hu> Cc: Paul Mackerras <paulus(a)samba.org> Cc: Arnaldo Carvalho de Melo <acme(a)redhat.com> Cc: Peter Zijlstra <peterz(a)infradead.org> Cc: Mike Galbraith <efault(a)gmx.de> Cc: Frederic Weisbecker <fweisbec(a)gmail.com> --- tools/perf/util/probe-finder.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index db52ec2..5f6cecc 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -812,8 +812,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); -- Masami Hiramatsu e-mail: mhiramat(a)redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |