]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - tools/perf/util/session.c
Merge branch 'perf/urgent' into perf/core
[~shefty/rdma-dev.git] / tools / perf / util / session.c
index 7d159088c4acc20114904c76e6974b95c4e15351..d9318d8a9ba1aabd00520c29119e36e5fb5e677f 100644 (file)
@@ -1377,6 +1377,10 @@ int perf_session__cpu_bitmap(struct perf_session *session,
        }
 
        map = cpu_map__new(cpu_list);
+       if (map == NULL) {
+               pr_err("Invalid cpu_list\n");
+               return -1;
+       }
 
        for (i = 0; i < map->nr; i++) {
                int cpu = map->map[i];