mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user