Skip to content

Commit 1b1f57c

Browse files
Manciukicacmel
authored andcommitted
perf script: Release zstd data
ASan reports several memory leak while running: # perf test "82: Use vfs_getname probe to get syscall args filenames" One of the leaks is caused by zstd data not being released on exit in perf-script. This patch adds the missing zstd_fini(). Signed-off-by: Riccardo Mancini <[email protected]> Fixes: b13b04d ("perf script: Initialize zstd_data") Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Milian Wolff <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lore.kernel.org/lkml/39388e8cc2f85ca219ea18697a17b7bd8f74b693.1626343282.git.rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 423b917 commit 1b1f57c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/perf/builtin-script.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4143,6 +4143,7 @@ int cmd_script(int argc, const char **argv)
41434143
zfree(&script.ptime_range);
41444144
}
41454145

4146+
zstd_fini(&(session->zstd_data));
41464147
evlist__free_stats(session->evlist);
41474148
perf_session__delete(session);
41484149

0 commit comments

Comments
 (0)