diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/parse-events.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 4c6b3d287d54..fbe0d3143353 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -360,8 +360,10 @@ __add_event(struct list_head *list, int *idx, event_attr_init(attr); evsel = evsel__new_idx(attr, *idx); - if (!evsel) + if (!evsel) { + perf_cpu_map__put(cpus); return NULL; + } (*idx)++; evsel->core.cpus = cpus; |