Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755436AbbGTG13 (ORCPT ); Mon, 20 Jul 2015 02:27:29 -0400 Received: from mga02.intel.com ([134.134.136.20]:53787 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753574AbbGTG11 (ORCPT ); Mon, 20 Jul 2015 02:27:27 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,507,1432623600"; d="scan'208";a="750572494" Message-ID: <55AC9424.1070304@intel.com> Date: Mon, 20 Jul 2015 14:24:36 +0800 From: Pan Xinhui User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" CC: "Rafael J. Wysocki" , Viresh Kumar , "yanmin_zhang@linux.intel.com" , "mnipxh@163.com" Subject: [PATCH] cpufreq: ia64: Fix a memory leak in acpi_cpufreq_cpu_exit Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1013 Lines: 29 From: Pan Xinhui freq_table should be alloced in ->init and freed in ->exit. However it does not be freed. Fix this memory leak in acpi_cpufreq_cpu_exit. Signed-off-by: Pan Xinhui --- drivers/cpufreq/ia64-acpi-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index 27cef0c..e02bd15 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c @@ -334,6 +334,7 @@ acpi_cpufreq_cpu_exit ( acpi_io_data[policy->cpu] = NULL; acpi_processor_unregister_performance(&data->acpi_data, policy->cpu); + kfree(policy->freq_table); kfree(data); } -- 1.9.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/