diff options
author | Riccardo Mancini <rickyman7@gmail.com> | 2021-07-15 18:07:07 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2021-07-15 17:27:49 -0300 |
commit | 42db3d9ded555f7148b5695109a7dc8d66f0dde4 (patch) | |
tree | 9f17c1e8fefa7dcb1e45b000e5a542467f54b6c8 /tools | |
parent | dedeb4be203b382ba7245d13079bc3b0f6d40c65 (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 <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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/env.c | 1 |
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); |