diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c index b36845347f014768cea5679a4842008992441134..aa6b490aa47192820d793adf263d9f90028a1b33 100644 --- a/tools/perf/util/cpumap.c +++ b/tools/perf/util/cpumap.c @@ -285,7 +285,7 @@ int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res, /* ensure we process id in increasing order */ qsort(c->map, c->nr, sizeof(int), cmp_ids); - atomic_set(&cpus->refcnt, 1); + atomic_set(&c->refcnt, 1); *res = c; return 0; }