Commit 57797f19 authored by Srinivas Pandruvada's avatar Srinivas Pandruvada

tools/power/x86/intel-speed-select: Add missing free cpuset

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: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
parent 137ba3b1
......@@ -1271,7 +1271,7 @@ static void set_tdp_level_for_cpu(struct isst_id *id, void *arg1, void *arg2, vo
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();
......@@ -1288,6 +1288,8 @@ static void set_tdp_level_for_cpu(struct isst_id *id, void *arg1, void *arg2, vo
}
}
}
free_mask:
free_cpu_set(ctdp_level.core_cpumask);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment