From patchwork Sat Feb 14 09:53:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Corbacho X-Patchwork-Id: 7224 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n1EADK2p029514 for ; Sat, 14 Feb 2009 10:13:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751342AbZBNKNU (ORCPT ); Sat, 14 Feb 2009 05:13:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751298AbZBNKNU (ORCPT ); Sat, 14 Feb 2009 05:13:20 -0500 Received: from bb-87-81-255-5.ukonline.co.uk ([87.81.255.5]:33145 "EHLO pegasus." rhost-flags-OK-OK-FAIL-FAIL) by vger.kernel.org with ESMTP id S1751342AbZBNKNU (ORCPT ); Sat, 14 Feb 2009 05:13:20 -0500 X-Greylist: delayed 1168 seconds by postgrey-1.27 at vger.kernel.org; Sat, 14 Feb 2009 05:13:14 EST Received: from [127.0.0.1] (localhost [127.0.0.1]) by pegasus. (8.14.3/8.13.8) with ESMTP id n1E9rmsv018594 for ; Sat, 14 Feb 2009 09:53:48 GMT From: Carlos Corbacho Subject: [PATCH 1/4] acer-wmi: double free in acer_rfkill_exit() To: linux-acpi@vger.kernel.org Date: Sat, 14 Feb 2009 09:53:48 +0000 Message-ID: <20090214095348.18550.46246.stgit@localhost> In-Reply-To: <20090214095342.18550.24339.stgit@localhost> References: <20090214095342.18550.24339.stgit@localhost> User-Agent: StGIT/0.14.1 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Dan Carpenter This is acer_rfkill_exit() from drivers/platform/x86/acer-wmi.c. The code frees wireless_rfkill->data again instead of bluetooth_rfkill->data. This was found using a code checker (http://repo.or.cz/w/smatch.git/). Compile tested only, sorry. regards, dan carpenter Signed-off-by: Dan Carpenter Signed-off-by: Carlos Corbacho --- 0 files changed, 0 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- orig/drivers/platform/x86/acer-wmi.c 2009-02-03 08:06:54.000000000 +0300 +++ devel/drivers/platform/x86/acer-wmi.c 2009-02-03 08:07:16.000000000 +0300 @@ -1026,7 +1026,7 @@ kfree(wireless_rfkill->data); rfkill_unregister(wireless_rfkill); if (has_cap(ACER_CAP_BLUETOOTH)) { - kfree(wireless_rfkill->data); + kfree(bluetooth_rfkill->data); rfkill_unregister(bluetooth_rfkill); } return;