Skip to content

Commit bb3de7f

Browse files
namhyungacmel
authored andcommitted
perf trace: Fix leaks of 'struct thread' in fprintf_sys_enter()
I've found some leaks from 'perf trace -a'. It seems there are more leaks but this is what I can find for now. Fixes: 7035102 ("perf thread: Add support for reading the e_machine type for a thread") Reviewed-by: Howard Chu <howardchu95@gmail.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250403054213.7021-1-namhyung@kernel.org [ split from a larget patch ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 70e21ac commit bb3de7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/builtin-trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2842,7 +2842,7 @@ static int trace__fprintf_sys_enter(struct trace *trace, struct evsel *evsel,
28422842
e_machine = thread__e_machine(thread, trace->host);
28432843
sc = trace__syscall_info(trace, evsel, e_machine, id);
28442844
if (sc == NULL)
2845-
return -1;
2845+
goto out_put;
28462846
ttrace = thread__trace(thread, trace);
28472847
/*
28482848
* We need to get ttrace just to make sure it is there when syscall__scnprintf_args()

0 commit comments

Comments
 (0)