Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751356AbaABIYf (ORCPT ); Thu, 2 Jan 2014 03:24:35 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:5467 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751233AbaABIYd (ORCPT ); Thu, 2 Jan 2014 03:24:33 -0500 From: Yijing Wang To: "Venkatesh Pallipadi (Venki)" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" CC: , , Yijing Wang , Hanjun Guo Subject: [PATCH] x86, hpet: fix memleak when hpet enable fail Date: Thu, 2 Jan 2014 16:22:12 +0800 Message-ID: <1388650932-5168-1-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.11.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.27.212] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 752 Lines: 28 We should free hpet_boot_cfg if hpet enable fail. Signed-off-by: Yijing Wang --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/