[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210621234317.235545-3-rickyman7@gmail.com>
Date: Tue, 22 Jun 2021 01:43:19 +0200
From: Riccardo Mancini <rickyman7@...il.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Riccardo Mancini <rickyman7@...il.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] perf script: delete evlist when deleting session
ASan reports a memory leak related to session->evlist never being deleted.
The evlist member is not deleted in perf_session__delete, so it should be
deleted separately.
This patch adds the missing deletion in perf-script.
Signed-off-by: Riccardo Mancini <rickyman7@...il.com>
---
tools/perf/builtin-script.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 1280cbfad4db..635a1d9cfc88 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3991,7 +3991,7 @@ int cmd_script(int argc, const char **argv)
zfree(&script.ptime_range);
}
- evlist__free_stats(session->evlist);
+ evlist__delete(session->evlist);
perf_session__delete(session);
if (script_started)
--
2.31.1
Powered by blists - more mailing lists