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
This commit is contained in:
Linus Torvalds
2026-01-21 21:50:44 -08:00

View File

@@ -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);