Skip to contentSkip to conversation

x86, hpet: fix memleak when hpet enable fail

PATCH New Yijing Wang 1 participant 1 message Jan 2, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, hpet: fix memleak when hpet enable fail

We should free hpet_boot_cfg if hpet enable fail.

---
 arch/x86/kernel/hpet.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/hpet.c +1 -0
index da85a8e..0ed00cc 100644
@@ -900,6 +900,7 @@ int __init hpet_enable(void)
 	return 0;
 
 out_nohpet:
+	kfree(hpet_boot_cfg);
 	hpet_clear_mapping();
 	hpet_address = 0;
 	return 0;
Signature · 1 line
1.7.1