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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);
	}
}