All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Rogers <irogers@google.com>
To: kajoljain <kjain@linux.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	eranian@google.com
Subject: Re: [PATCH] perf bpf: Fix memory leak during synthesis.
Date: Thu, 26 Aug 2021 11:49:43 -0700	[thread overview]
Message-ID: <CAP-5=fVvZMyQdFm2u28VeK9QKspe2t1PoM9AB3_c--8Rgk4U+g@mail.gmail.com> (raw)
In-Reply-To: <ad17ba1f-34d8-fa5e-72fc-e05107fe2822@linux.ibm.com>

On Thu, Aug 26, 2021 at 1:02 AM kajoljain <kjain@linux.ibm.com> wrote:
>
>
>
> On 8/26/21 5:46 AM, Ian Rogers wrote:
> > BTF needs to be freed with btf_free.
> >
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> >  tools/perf/util/bpf-event.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/bpf-event.c b/tools/perf/util/bpf-event.c
> > index cdecda1ddd36..d193104db7f7 100644
> > --- a/tools/perf/util/bpf-event.c
> > +++ b/tools/perf/util/bpf-event.c
> > @@ -296,7 +296,7 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
> >
> >  out:
> >       free(info_linear);
> > -     free(btf);
> > +     btf__free(btf);
>
> Hi Ian,
>    Patch looks good to me. I can see in one more place we are using free(btf) in the
> same file. Can you correct that as well.

Done. Also found 1 more in annotate :-)
https://lore.kernel.org/lkml/20210826184833.408563-1-irogers@google.com/T/#u

Thanks,
Ian

> Thanks,
> Kajol Jain
>
> >       return err ? -1 : 0;
> >  }
> >
> >

      reply	other threads:[~2021-08-26 18:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  0:16 [PATCH] perf bpf: Fix memory leak during synthesis Ian Rogers
2021-08-26  8:02 ` kajoljain
2021-08-26 18:49   ` Ian Rogers [this message]

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='CAP-5=fVvZMyQdFm2u28VeK9QKspe2t1PoM9AB3_c--8Rgk4U+g@mail.gmail.com' \
    --to=irogers@google.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.