Commit 1b1f57cf authored by Riccardo Mancini's avatar Riccardo Mancini Committed by Arnaldo Carvalho de Melo

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: default avatarRiccardo Mancini <rickyman7@gmail.com>
Fixes: b13b04d9 ("perf script: Initialize zstd_data")
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Milian Wolff <milian.wolff@kdab.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/39388e8cc2f85ca219ea18697a17b7bd8f74b693.1626343282.git.rickyman7@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 423b9174
...@@ -4143,6 +4143,7 @@ int cmd_script(int argc, const char **argv) ...@@ -4143,6 +4143,7 @@ int cmd_script(int argc, const char **argv)
zfree(&script.ptime_range); zfree(&script.ptime_range);
} }
zstd_fini(&(session->zstd_data));
evlist__free_stats(session->evlist); evlist__free_stats(session->evlist);
perf_session__delete(session); perf_session__delete(session);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment