Skip to content

Commit 57797f1

Browse files
committed
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 <[email protected]>
1 parent 137ba3b commit 57797f1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/power/x86/intel-speed-select/isst-config.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ static void set_tdp_level_for_cpu(struct isst_id *id, void *arg1, void *arg2, vo
12711271
ret = isst_get_coremask_info(id, tdp_level, &ctdp_level);
12721272
if (ret) {
12731273
isst_display_error_info_message(1, "Can't get coremask, online/offline option is ignored", 0, 0);
1274-
return;
1274+
goto free_mask;
12751275
}
12761276
if (ctdp_level.cpu_count) {
12771277
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
12881288
}
12891289
}
12901290
}
1291+
free_mask:
1292+
free_cpu_set(ctdp_level.core_cpumask);
12911293
}
12921294
}
12931295

0 commit comments

Comments
 (0)