Messages in this thread Patch in this message | | | Date | Thu, 8 Jun 2023 16:28:09 -0700 | Subject | [PATCH v2 12/26] perf intel-pt: Fix missed put and leak | From | Ian Rogers <> |
| |
Add missing put and free, detected with leak sanitizer.
Signed-off-by: Ian Rogers <irogers@google.com> --- tools/perf/util/intel-pt.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c index 783ce61c6d25..dbf0bc71a63b 100644 --- a/tools/perf/util/intel-pt.c +++ b/tools/perf/util/intel-pt.c @@ -1280,6 +1280,7 @@ static void intel_pt_add_br_stack(struct intel_pt *pt, pt->kernel_start); sample->branch_stack = pt->br_stack; + thread__put(thread); } /* INTEL_PT_LBR_0, INTEL_PT_LBR_1 and INTEL_PT_LBR_2 */ @@ -3580,6 +3581,7 @@ static void intel_pt_free(struct perf_session *session) zfree(&pt->chain); zfree(&pt->filter); zfree(&pt->time_ranges); + zfree(&pt->br_stack); free(pt); } -- 2.41.0.162.gfafddb0af9-goog
| |