Re: [PATCH] perf evsel: Fix 2 memory leaks

2020-05-13 Thread Ian Rogers
On Wed, May 13, 2020 at 6:36 AM Arnaldo Carvalho de Melo wrote: > > Em Tue, May 12, 2020 at 04:59:18PM -0700, Ian Rogers escreveu: > > If allocated, perf_pkg_mask and metric_events need freeing. > > Applied, were those found with some tool? Or just by visual inspection? > > Also I noticed that evs

Re: [PATCH] perf evsel: Fix 2 memory leaks

2020-05-13 Thread Arnaldo Carvalho de Melo
Em Tue, May 12, 2020 at 04:59:18PM -0700, Ian Rogers escreveu: > If allocated, perf_pkg_mask and metric_events need freeing. Applied, were those found with some tool? Or just by visual inspection? Also I noticed that evsel->metric_events is correctly initialized to NULL in evsel__init(), but evse

[PATCH] perf evsel: Fix 2 memory leaks

2020-05-12 Thread Ian Rogers
If allocated, perf_pkg_mask and metric_events need freeing. 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 a2397ca4d57a..654b79c1f4ac 100644 --- a/tools/p