From patchwork Tue Oct 12 01:09:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhang Rui X-Patchwork-Id: 246641 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9C1CRea032365 for ; Tue, 12 Oct 2010 01:12:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755602Ab0JLBMZ (ORCPT ); Mon, 11 Oct 2010 21:12:25 -0400 Received: from mga09.intel.com ([134.134.136.24]:19327 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753658Ab0JLBMY (ORCPT ); Mon, 11 Oct 2010 21:12:24 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 11 Oct 2010 18:12:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.57,317,1283756400"; d="scan'208";a="666449896" Received: from rui.sh.intel.com (HELO [10.239.51.31]) ([10.239.51.31]) by orsmga001.jf.intel.com with ESMTP; 11 Oct 2010 18:12:23 -0700 Subject: [PATCH] acpi-cpufreq: fix a memleak when unloading acpi-cpufreq driver From: Zhang Rui To: "Brown, Len" Cc: "linux-acpi@vger.kernel.org" , "Zhang, Rui" , toralf.foerster@gmx.de Date: Tue, 12 Oct 2010 09:09:37 +0800 Message-ID: <1286845777.2111.4082.camel@rui> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 12 Oct 2010 01:12:27 +0000 (UTC) Index: linux-2.6/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ linux-2.6/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c @@ -701,6 +701,7 @@ static int acpi_cpufreq_cpu_exit(struct per_cpu(acfreq_data, policy->cpu) = NULL; acpi_processor_unregister_performance(data->acpi_data, policy->cpu); + kfree(data->freq_table); kfree(data); }