lkml.org 
[lkml]   [2010]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -tip 4/4] [BUGFIX][RESEND] perf probe: Fix to close dwarf when failing to analyze it
    Date
    Fix to close libdw routine when failing to analyze it in
    find_perf_probe_point().

    Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    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>
    ---

    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 59b0115..a851377 100644
    --- a/tools/perf/util/probe-finder.c
    +++ b/tools/perf/util/probe-finder.c
    @@ -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);

    --
    Masami Hiramatsu
    e-mail: mhiramat@redhat.com


    \
     
     \ /
      Last update: 2010-04-02 19:07    [W:0.021 / U:0.076 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site