[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140419223356.GB6234@krava.redhat.com>
Date: Sun, 20 Apr 2014 00:33:56 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Masanari Iida <standby24x7@...il.com>
Cc: a.p.zijlstra@...llo.nl, paulus@...ba.org, mingo@...hat.com,
acme@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf test x86: Fit memory leak in sample_ustack()
On Sun, Apr 20, 2014 at 12:19:13AM +0200, Jiri Olsa wrote:
> On Sun, Apr 20, 2014 at 12:16:41AM +0900, Masanari Iida wrote:
> > buf is not freed, when kernel failed to get stack map
> > and return.
> >
> > Signed-off-by: Masanari Iida <standby24x7@...il.com>
>
> Acked-by: Jiri Olsa <jolsa@...hat.com>
>
> thanks,
> jirka
>
> > ---
> > tools/perf/arch/x86/tests/dwarf-unwind.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/tools/perf/arch/x86/tests/dwarf-unwind.c b/tools/perf/arch/x86/tests/dwarf-unwind.c
> > index b602ad9..68f2711 100644
> > --- a/tools/perf/arch/x86/tests/dwarf-unwind.c
> > +++ b/tools/perf/arch/x86/tests/dwarf-unwind.c
> > @@ -26,6 +26,7 @@ static int sample_ustack(struct perf_sample *sample,
> > map = map_groups__find(&thread->mg, MAP__FUNCTION, (u64) sp);
> > if (!map) {
> > pr_debug("failed to get stack map\n");
> > + kfree(buf);
and changing this to free(buf) ;-)
jirka
> > return -1;
> > }
> >
> > --
> > 1.9.2.468.g3f0c02a
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists