summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRiccardo Mancini <rickyman7@gmail.com>2021-07-15 19:07:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-28 15:35:35 +0300
commitb8892d16a9287c1b3f57fa7480188da13b14e30d (patch)
treeb52c8086d0a7362977ea147dbd008d7d3d5034d2 /tools
parent306411a8bf75568380bf00f37eb535c7c09eef0d (diff)
downloadlinux-b8892d16a9287c1b3f57fa7480188da13b14e30d.tar.xz
perf env: Fix sibling_dies memory leak
[ Upstream commit 42db3d9ded555f7148b5695109a7dc8d66f0dde4 ] ASan reports a memory leak in perf_env while running: # perf test "41: Session topology" Caused by sibling_dies not being freed. This patch adds the required free. Fixes: acae8b36cded0ee6 ("perf header: Add die information in CPU topology") Signed-off-by: Riccardo Mancini <rickyman7@gmail.com> Cc: Ian Rogers <irogers@google.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> Link: http://lore.kernel.org/lkml/2140d0b57656e4eb9021ca9772250c24c032924b.1626343282.git.rickyman7@gmail.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/env.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index fadc59708ece..744e51c4a6bd 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -178,6 +178,7 @@ void perf_env__exit(struct perf_env *env)
zfree(&env->cpuid);
zfree(&env->cmdline);
zfree(&env->cmdline_argv);
+ zfree(&env->sibling_dies);
zfree(&env->sibling_cores);
zfree(&env->sibling_threads);
zfree(&env->pmu_mappings);