From 7900938850645ed41770bddba524416f8c84dc2d Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Tue, 1 Apr 2025 13:27:15 -0700 Subject: [PATCH] perf trace: Add missing thread__put() in thread__e_machine() Add missing thread__put() of the found parent thread in thread__e_machine(). Reviewed-by: Howard Chu Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250401202715.3493567-1-irogers@google.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index 89585f53c1d5..415c0e5d1e75 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -471,6 +471,7 @@ uint16_t thread__e_machine(struct thread *thread, struct machine *machine) if (parent) { e_machine = thread__e_machine(parent, machine); + thread__put(parent); thread__set_e_machine(thread, e_machine); return e_machine; } -- 2.25.1