From: Andi Kleen Subject: Re: [RFC PATCH v3 06/14] perf evsel: fix 2 memory leaks Date: Fri, 8 May 2020 17:39:36 -0700 Message-ID: <20200509003936.GH3538@tassilo.jf.intel.com> References: <20200508053629.210324-1-irogers@google.com> <20200508053629.210324-7-irogers@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20200508053629.210324-7-irogers@google.com> Sender: netdev-owner@vger.kernel.org To: Ian Rogers Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh , Kajol Jain , John Garry , Jin Yao , Kan Liang , Cong Wang Kim List-Id: linux-perf-users.vger.kernel.org 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. For them Reviewed-by: Andi Kleen > > Signed-off-by: Ian Rogers > --- > 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 >