aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2020-05-12 16:59:18 -0700
committerArnaldo Carvalho de Melo <[email protected]>2020-05-28 10:03:26 -0300
commit3efc899d9afb3d03604f191a0be9669eabbfc4aa (patch)
tree6180e8bfab880b21c75bb980064884d2453ce8ee
parent7fcdccd4237724931d9773d1e3039bfe053a6f52 (diff)
perf evsel: Fix 2 memory leaks
If allocated, perf_pkg_mask and metric_events need freeing. Signed-off-by: Ian Rogers <[email protected]> Reviewed-by: Andi Kleen <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/evsel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a2397ca4d57a..654b79c1f4ac 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1266,6 +1266,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);
}