Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 70351029b55677eb ("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>

authored by

Namhyung Kim and committed by
Arnaldo Carvalho de Melo
bb3de7fa 70e21ac8

+1 -1
+1 -1
tools/perf/builtin-trace.c
··· 2842 2842 e_machine = thread__e_machine(thread, trace->host); 2843 2843 sc = trace__syscall_info(trace, evsel, e_machine, id); 2844 2844 if (sc == NULL) 2845 - return -1; 2845 + goto out_put; 2846 2846 ttrace = thread__trace(thread, trace); 2847 2847 /* 2848 2848 * We need to get ttrace just to make sure it is there when syscall__scnprintf_args()