diff options
author | Ian Rogers <irogers@google.com> | 2020-05-12 16:59:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-01 13:14:46 +0200 |
commit | 56540590ce7c316947d6740edc0403182a1e1ade (patch) | |
tree | 31935252e681e500444577d5e75e98320050cd7b /tools | |
parent | b7e24664cc816717ca2a45b773d950a9188fb5c1 (diff) | |
download | linux-stable-56540590ce7c316947d6740edc0403182a1e1ade.tar.gz linux-stable-56540590ce7c316947d6740edc0403182a1e1ade.tar.bz2 linux-stable-56540590ce7c316947d6740edc0403182a1e1ade.zip |
perf evsel: Fix 2 memory leaks
[ Upstream commit 3efc899d9afb3d03604f191a0be9669eabbfc4aa ]
If allocated, perf_pkg_mask and metric_events need freeing.
Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Andi 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.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/evsel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 68c5ab0e1800..11a2aa80802d 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1291,6 +1291,8 @@ void perf_evsel__exit(struct perf_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); } |