[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190924144418.GC21815@krava>
Date: Tue, 24 Sep 2019 16:44:18 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Andi Kleen <ak@...ux.intel.com>
Cc: Andi Kleen <andi@...stfloor.org>, acme@...nel.org,
jolsa@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] perf, stat: Fix free memory access / memory leaks in
metrics
On Tue, Sep 24, 2019 at 07:08:56AM -0700, Andi Kleen wrote:
> > > expr__ctx_init(&pctx);
> > > + /* Must be first id entry */
> > > + expr__add_id(&pctx, name, avg);
> >
> > hum, shouldn't u instead use strdup(name) instead of name?
>
> The cleanup loop later skips freeing the first entry.
aaah, nice ;-)
Acked-by: Jiri Olsa <jolsa@...nel.org>
thanks,
jirka
Powered by blists - more mailing lists