diff options
-rw-r--r-- | tools/perf/util/session.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 85c1e6b76f0a..0f4555ce9063 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1333,6 +1333,10 @@ int perf_session__cpu_bitmap(struct perf_session *session, | |||
1333 | } | 1333 | } |
1334 | 1334 | ||
1335 | map = cpu_map__new(cpu_list); | 1335 | map = cpu_map__new(cpu_list); |
1336 | if (map == NULL) { | ||
1337 | pr_err("Invalid cpu_list\n"); | ||
1338 | return -1; | ||
1339 | } | ||
1336 | 1340 | ||
1337 | for (i = 0; i < map->nr; i++) { | 1341 | for (i = 0; i < map->nr; i++) { |
1338 | int cpu = map->map[i]; | 1342 | int cpu = map->map[i]; |