Skip to content

Commit e0c6082

Browse files
watologo1Dominik Brodowski
authored andcommitted
cpupower: Remove unneeded code and by that fix a memleak
Looks like some not needed debug code slipped in. Also this code: tmp = sysfs_get_idlestate_name(cpu, idlestates - 1); performs a strdup and the mem was not freed again. -> delete it. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
1 parent 0b37ee6 commit e0c6082

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

‎tools/power/cpupower/utils/cpuidle-info.c‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
3535
printf(_("CPU %u: Can't read idle state info\n"), cpu);
3636
return;
3737
}
38-
tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
39-
if (!tmp) {
40-
printf(_("Could not determine max idle state %u\n"),
41-
idlestates - 1);
42-
return;
43-
}
44-
4538
printf(_("Number of idle states: %d\n"), idlestates);
4639
printf(_("Available idle states:"));
4740
for (idlestate = 0; idlestate < idlestates; idlestate++) {

0 commit comments

Comments
 (0)