Skip to contentSkip to conversation

cpufreq: unnecesary double free in pcc_cpufreq_do_osc

PATCH Superseded Davidlohr Bueso 1 participant 1 message Sep 24, 2010 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: unnecesary double free in pcc_cpufreq_do_osc

x86, cpufreq: avoid an unnecessary double free when finished in pcc_cpufreq_do_osc()

There is no need to fall through the out_free label thus saving a kfree call.

---
 arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +2 -0
index 994230d..db7dc35 100644
@@ -379,6 +379,8 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle)
 	if (!(supported & 0x1))
 		return -ENODEV;
 
+	return ret;
+
 out_free:
 	kfree(output.pointer);
 	return ret;
Signature · 1 line
1.7.0.4