From: Ian Rogers Date: Tue, 1 Apr 2025 20:27:15 +0000 (-0700) Subject: perf trace: Add missing thread__put() in thread__e_machine() X-Git-Tag: v6.16-rc1~57^2~90 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7900938850645ed41770bddba524416f8c84dc2d;p=linux-block.git 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 --- 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; }