Re: [PATCH] perf report: Fix a memory leak for perf_env on AMD
From: Namhyung Kim
Date: Tue Mar 25 2025 - 15:51:40 EST
On Mon, 10 Mar 2025 17:04:16 -0700, Namhyung Kim wrote:
> The env.pmu_mapping can be leaked when it reads data from a pipe on AMD.
> For a pipe data, it reads the header data including pmu_mapping from
> PERF_RECORD_HEADER_FEATURE runtime. But it's already set in:
>
> perf_session__new()
> __perf_session__new()
> evlist__init_trace_event_sample_raw()
> evlist__has_amd_ibs()
> perf_env__nr_pmu_mappings()
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung