Re: [PATCH] perf parse-events: Fix evsel allocation failure
From: Namhyung Kim
Date: Tue Jan 06 2026 - 17:54:22 EST
On Tue, Jan 06, 2026 at 06:55:57PM -0300, Arnaldo Carvalho de Melo wrote:
> On Mon, Sep 22, 2025 at 11:38:34PM +0530, Faisal Bukhari wrote:
> > If evsel__new_idx() returns NULL, the function currently jumps
> > to label 'out_err'.
> > Here, references to `cpus` and `pmu_cpus` are dropped.
> > Also, resources held by evsel->name and evsel->metric_id are freed.
> > But if evsel__new_idx() returns NULL,
> > it can lead to NULL pointer dereference.
>
> You forgot to add:
>
> Fixes: cd63c22168257a0b ("perf parse-events: Minor __add_event refactoring")
>
> Reviewed-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> Namhyung, I think this should go into v6.19-rc,
Sure, will add.
Thanks,
Namhyung