projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d680be
)
perf parse-event: Release cpu_map refcount if evsel alloc failed
author
Namhyung Kim
<namhyung@kernel.org>
Thu, 17 Sep 2020 06:02:18 +0000
(15:02 +0900)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Thu, 17 Sep 2020 16:28:15 +0000
(13:28 -0300)
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link:
http://lore.kernel.org/lkml/20200917060219.1287863-1-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/parse-events.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/parse-events.c
b/tools/perf/util/parse-events.c
index
4c6b3d2
..
fbe0d31
100644
(file)
--- 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;