]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/perf/util/evlist.c
perf evlist: Reference count the cpu and thread maps at set_maps()
[karo-tx-linux.git] / tools / perf / util / evlist.c
index d1392194a9a951bd3e1dd5c9b72fd383ede98439..b4b96120fc3b4336749e97a7ede90725c1c4340e 100644 (file)
@@ -1211,12 +1211,12 @@ void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus,
         */
        if (cpus != evlist->cpus) {
                cpu_map__put(evlist->cpus);
-               evlist->cpus = cpus;
+               evlist->cpus = cpu_map__get(cpus);
        }
 
        if (threads != evlist->threads) {
                thread_map__put(evlist->threads);
-               evlist->threads = threads;
+               evlist->threads = thread_map__get(threads);
        }
 
        perf_evlist__propagate_maps(evlist);