projects/linux·commit 79f255b2

Merge tag 'perf-tools-fixes-for-v6.19-2026-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools

79f255b2 · Linus Torvalds <[email protected]> · 2026-01-21 21:50:44 -08:00

Pull perf-tools fix from Namhyung Kim:
 "A minor fix for error handling in the event parser"

* tag 'perf-tools-fixes-for-v6.19-2026-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools:
  perf parse-events: Fix evsel allocation failure
Commit
79f255b2e9a2f714efcd91777ccb9e4827e20006
Parents
cf38b234 · 1eb217ab

Merge commit. Changes below are compared with the first parent: cf38b234.

Changes

1 files changed · +5 −2

FileStatusAddDelContent
tools/perf/util/parse-events.cmodified+5−2View file

tools/perf/util/parse-events.c

View file
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 17c1c36..000c89a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -251,8 +251,11 @@ __add_event(struct list_head *list, int *idx,
event_attr_init(attr);
evsel = evsel__new_idx(attr, *idx);
- if (!evsel)
- goto out_err;
+ if (!evsel) {
+ perf_cpu_map__put(cpus);
+ perf_cpu_map__put(pmu_cpus);
+ return NULL;
+ }
if (name) {
evsel->name = strdup(name);