aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Mancini <[email protected]>2021-07-15 18:07:07 +0200
committerArnaldo Carvalho de Melo <[email protected]>2021-07-15 17:27:49 -0300
commit42db3d9ded555f7148b5695109a7dc8d66f0dde4 (patch)
tree9f17c1e8fefa7dcb1e45b000e5a542467f54b6c8
parentdedeb4be203b382ba7245d13079bc3b0f6d40c65 (diff)
perf env: Fix sibling_dies memory leak
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 <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/2140d0b57656e4eb9021ca9772250c24c032924b.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-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 ebc5e9ad35db..6c765946ef6f 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -186,6 +186,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);