public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] perf, stat: Fix free memory access / memory leaks in metrics
Date: Tue, 24 Sep 2019 16:44:18 +0200	[thread overview]
Message-ID: <20190924144418.GC21815@krava> (raw)
In-Reply-To: <20190924140856.GQ8537@tassilo.jf.intel.com>

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@kernel.org>

thanks,
jirka

  reply	other threads:[~2019-09-24 14:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-23 23:33 [PATCH 1/3] perf, evlist: Fix access of freed id arrays Andi Kleen
2019-09-23 23:33 ` [PATCH 2/3] perf, expr: Remove assert usage Andi Kleen
2019-09-24  7:44   ` Jiri Olsa
2019-09-23 23:33 ` [PATCH 3/3] perf, stat: Fix free memory access / memory leaks in metrics Andi Kleen
2019-09-24  7:50   ` Jiri Olsa
2019-09-24 14:08     ` Andi Kleen
2019-09-24 14:44       ` Jiri Olsa [this message]
2019-09-24 19:20         ` Arnaldo Carvalho de Melo
2019-09-24  7:44 ` [PATCH 1/3] perf, evlist: Fix access of freed id arrays Jiri Olsa
2019-09-24 16:05   ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190924144418.GC21815@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox