summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2025-04-01 13:27:15 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2025-05-08 11:50:44 -0300
commit7900938850645ed41770bddba524416f8c84dc2d (patch)
tree5a44012017c193095fe612daf7712d6afdc3d9bd
parent8830091383b034981d882773078e18bb2a7e0e53 (diff)
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 <howardchu95@gmail.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250401202715.3493567-1-irogers@google.com [ split from a larger patch ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/thread.c1
1 files changed, 1 insertions, 0 deletions
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;
}