Thread (50 messages) 50 messages, 3 authors, 2022-01-06

Re: [PATCH 12/20] perf script: release zstd data

From: Arnaldo Carvalho de Melo <acme@kernel.org>
Date: 2021-07-15 20:23:21
Also in: lkml

Em Thu, Jul 15, 2021 at 06:07:17PM +0200, Riccardo Mancini escreveu:
ASan reports several memory leak while running the 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.
Fixes: b13b04d9382113f7 ("perf script: Initialize zstd_data")

Thanks, applied.

- Arnaldo

 
quoted hunk ↗ jump to hunk
Signed-off-by: Riccardo Mancini <redacted>
---
 tools/perf/builtin-script.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 8c03a9862872d495..bae0e5b72c0e6050 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -4143,6 +4143,7 @@ int cmd_script(int argc, const char **argv)
 		zfree(&script.ptime_range);
 	}
 
+	zstd_fini(&(session->zstd_data));
 	evlist__free_stats(session->evlist);
 	perf_session__delete(session);
 
-- 
2.31.1
-- 

- Arnaldo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help