[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1388650932-5168-1-git-send-email-wangyijing@huawei.com>
Date: Thu, 2 Jan 2014 16:22:12 +0800
From: Yijing Wang <wangyijing@...wei.com>
To: "Venkatesh Pallipadi (Venki)" <venki@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
CC: <x86@...nel.org>, <linux-kernel@...r.kernel.org>,
Yijing Wang <wangyijing@...wei.com>,
Hanjun Guo <guohanjun@...wei.com>
Subject: [PATCH] x86, hpet: fix memleak when hpet enable fail
We should free hpet_boot_cfg if hpet enable fail.
Signed-off-by: Yijing Wang <wangyijing@...wei.com>
---
arch/x86/kernel/hpet.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index da85a8e..0ed00cc 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -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;
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists