dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Thomas Renninger 2011-12-16 15:35:54 +01:00 committed by Dominik Brodowski
parent 0b37ee65e5
commit e0c6082dae
1 changed files with 0 additions and 7 deletions

View File

@ -35,13 +35,6 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
printf(_("CPU %u: Can't read idle state info\n"), cpu);
return;
}
tmp = sysfs_get_idlestate_name(cpu, idlestates - 1);
if (!tmp) {
printf(_("Could not determine max idle state %u\n"),
idlestates - 1);
return;
}
printf(_("Number of idle states: %d\n"), idlestates);
printf(_("Available idle states:"));
for (idlestate = 0; idlestate < idlestates; idlestate++) {