diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-01-21 21:50:44 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-01-21 21:50:44 -0800 |
| commit | 79f255b2e9a2f714efcd91777ccb9e4827e20006 (patch) | |
| tree | 17d1e20676bd8dad131fd39697adab72ecd2e243 | |
| parent | cf38b2340c0e60ef695b7137440a4d187ed49c88 (diff) | |
| parent | 1eb217ab2e737609f8a861b517649e82e7236d05 (diff) | |
Merge tag 'perf-tools-fixes-for-v6.19-2026-01-21' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
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
| -rw-r--r-- | tools/perf/util/parse-events.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 17c1c36a7bf9..000c89a1e50d 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); |
