diff options
| author | Faisal Bukhari <faisalbukhari523@gmail.com> | 2025-09-22 23:38:34 +0530 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2026-01-06 14:54:24 -0800 |
| commit | 1eb217ab2e737609f8a861b517649e82e7236d05 (patch) | |
| tree | 47575d155dad641651835c86adee4d1c119c3cb7 /drivers/staging/android/git@git.tavy.me:linux.git | |
| parent | fe072f651083c612278de82ce08bccdfecf574b3 (diff) | |
perf parse-events: Fix evsel allocation failure
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.
Fixes: cd63c22168257a0b ("perf parse-events: Minor __add_event refactoring")
Signed-off-by: Faisal Bukhari <faisalbukhari523@gmail.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'drivers/staging/android/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
