lkml.org 
[lkml]   [2021]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 12/20] perf script: release zstd data
Date
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.

Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
---
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
\
 
 \ /
  Last update: 2021-07-15 18:09    [W:0.180 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site