lkml.org 
[lkml]   [2020]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH v3 06/14] perf evsel: fix 2 memory leaks
On Fri, May 8, 2020 at 5:39 PM Andi Kleen <ak@linux.intel.com> wrote:
>
> On Thu, May 07, 2020 at 10:36:21PM -0700, Ian Rogers wrote:
> > If allocated, perf_pkg_mask and metric_events need freeing.
>
> All these patches at the beginning look like straight forward
> bug fixes and are really independent of the new features.

Thanks, for context I added them after v1 to make it easier to apply
the patches.

Ian

> For them
>
> Reviewed-by: Andi Kleen <ak@linux.intel.com>
>
> >
> > Signed-off-by: Ian Rogers <irogers@google.com>
> > ---
> > tools/perf/util/evsel.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> > index 28683b0eb738..05bb46baad6a 100644
> > --- a/tools/perf/util/evsel.c
> > +++ b/tools/perf/util/evsel.c
> > @@ -1263,6 +1263,8 @@ void evsel__exit(struct evsel *evsel)
> > zfree(&evsel->group_name);
> > zfree(&evsel->name);
> > zfree(&evsel->pmu_name);
> > + zfree(&evsel->per_pkg_mask);
> > + zfree(&evsel->metric_events);
> > perf_evsel__object.fini(evsel);
> > }
> >
> > --
> > 2.26.2.645.ge9eca65c58-goog
> >

\
 
 \ /
  Last update: 2020-05-09 02:42    [W:0.067 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site