During perf level change cpuset is allocated but not freed.
Add free_cpu_set() in success and failure path.
Although this is not an issue, as the program will exit after
processing of online/offline, but for completeness add the
free_cpu_set().
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
ret = isst_get_coremask_info(id, tdp_level, &ctdp_level);
if (ret) {
isst_display_error_info_message(1, "Can't get coremask, online/offline option is ignored", 0, 0);
- return;
+ goto free_mask;
}
if (ctdp_level.cpu_count) {
int i, max_cpus = get_topo_max_cpus();
}
}
}
+free_mask:
+ free_cpu_set(ctdp_level.core_cpumask);
}
}