aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorThomas Renninger <trenn@suse.de>2011-12-16 09:35:54 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2012-03-03 08:40:10 -0500
commite0c6082daeb982df70f00bbb122fed66f7f57c3e (patch)
tree2032a8c9ffbdfc23d1f9e959aa73635ddce83d36 /tools/power
parent0b37ee65e5d5e626b50852718ed72979160f7be0 (diff)
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>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/cpupower/utils/cpuidle-info.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c
index e076bebde1c4..8145af5f93a6 100644
--- a/tools/power/cpupower/utils/cpuidle-info.c
+++ b/tools/power/cpupower/utils/cpuidle-info.c
@@ -35,13 +35,6 @@ static void cpuidle_cpu_output(unsigned int cpu, int verbose)
35 printf(_("CPU %u: Can't read idle state info\n"), cpu); 35 printf(_("CPU %u: Can't read idle state info\n"), cpu);
36 return; 36 return;
37 } 37 }
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
45 printf(_("Number of idle states: %d\n"), idlestates); 38 printf(_("Number of idle states: %d\n"), idlestates);
46 printf(_("Available idle states:")); 39 printf(_("Available idle states:"));
47 for (idlestate = 0; idlestate < idlestates; idlestate++) { 40 for (idlestate = 0; idlestate < idlestates; idlestate++) {