Commit 3efc899d authored by Ian Rogers's avatar Ian Rogers Committed by Arnaldo Carvalho de Melo

perf evsel: Fix 2 memory leaks

If allocated, perf_pkg_mask and metric_events need freeing.
Signed-off-by: default avatarIan Rogers <irogers@google.com>
Reviewed-by: default avatarAndi Kleen <ak@linux.intel.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lore.kernel.org/lkml/20200512235918.10732-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7fcdccd4
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment