[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190924140856.GQ8537@tassilo.jf.intel.com>
Date: Tue, 24 Sep 2019 07:08:56 -0700
From: Andi Kleen <ak@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.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
> > 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.
-Andi
Powered by blists - more mailing lists