Skip to content

Commit 79f255b

Browse files
committed
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
2 parents cf38b23 + 1eb217a commit 79f255b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tools/perf/util/parse-events.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ __add_event(struct list_head *list, int *idx,
251251
event_attr_init(attr);
252252

253253
evsel = evsel__new_idx(attr, *idx);
254-
if (!evsel)
255-
goto out_err;
254+
if (!evsel) {
255+
perf_cpu_map__put(cpus);
256+
perf_cpu_map__put(pmu_cpus);
257+
return NULL;
258+
}
256259

257260
if (name) {
258261
evsel->name = strdup(name);

0 commit comments

Comments
 (0)