diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2023-02-22 14:26:29 +0300 |
---|---|---|
committer | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2023-03-22 23:36:55 +0300 |
commit | 57797f19d5a78b5a84b7452790f7da22865f6420 (patch) | |
tree | e77ca5fbffd67c06abc8d6bd46c3ed1d6184eb45 /tools | |
parent | 137ba3b13aacf80b64d363dd7cff69c2aed161f0 (diff) | |
download | linux-57797f19d5a78b5a84b7452790f7da22865f6420.tar.xz |
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: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-config.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index a04005622b32..a9bd87b4d4ee 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -1271,7 +1271,7 @@ display_result: 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 @@ display_result: } } } +free_mask: + free_cpu_set(ctdp_level.core_cpumask); } } |