linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf trace: free filter_pids entries in trace__exit()
@ 2026-11-17  9:56 Gu Bin
  2026-11-17  9:56 ` [PATCH] perf parse-events: free partially copied terms if term cloning fails Gu Bin
  2026-11-17 10:03 ` [PATCH] perf trace: free filter_pids entries in trace__exit() sashiko-bot
  0 siblings, 2 replies; 4+ messages in thread
From: Gu Bin @ 2026-11-17  9:56 UTC (permalink / raw)
  To: acme
  Cc: peterz, mingo, namhyung, mark.rutland, alexander.shishkin, jolsa,
	irogers, adrian.hunter, james.clark, linux-perf-users,
	linux-kernel

trace__set_filter_pids_from_option() allocates trace->filter_pids.entries
with calloc() when the --filter-pids option is parsed, but trace__exit()
never frees it.  Free it there along with the other entries array of the
trace struct, ev_qualifier_ids.

Fixes: f078c3852c73 ("perf trace: Introduce --filter-pids")
Signed-off-by: Gu Bin <gubin@cmss.chinamobile.com>
---
 tools/perf/builtin-trace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 4094141461f91..9bd95be106d19 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -5755,6 +5755,7 @@ static void trace__exit(struct trace *trace)
 	thread__zput(trace->current);
 	strlist__delete(trace->ev_qualifier);
 	zfree(&trace->ev_qualifier_ids.entries);
+	zfree(&trace->filter_pids.entries);
 	if (trace->syscalls.table) {
 		for (size_t i = 0; i < trace->syscalls.table_size; i++)
 			syscall__delete(trace->syscalls.table[i]);
-- 
2.50.1.windows.1




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-17 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  9:56 [PATCH] perf trace: free filter_pids entries in trace__exit() Gu Bin
2026-11-17  9:56 ` [PATCH] perf parse-events: free partially copied terms if term cloning fails Gu Bin
2026-11-17 10:06   ` sashiko-bot
2026-11-17 10:03 ` [PATCH] perf trace: free filter_pids entries in trace__exit() sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).