From patchwork Thu Dec 3 16:27:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anisse Astier X-Patchwork-Id: 64574 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 nB3GbDSS030336 for ; Thu, 3 Dec 2009 16:37:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753458AbZLCQhA (ORCPT ); Thu, 3 Dec 2009 11:37:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753725AbZLCQg7 (ORCPT ); Thu, 3 Dec 2009 11:36:59 -0500 Received: from mail-ew0-f210.google.com ([209.85.219.210]:33555 "EHLO mail-ew0-f210.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753210AbZLCQg6 (ORCPT ); Thu, 3 Dec 2009 11:36:58 -0500 X-Greylist: delayed 466 seconds by postgrey-1.27 at vger.kernel.org; Thu, 03 Dec 2009 11:36:58 EST Received: by ewy2 with SMTP id 2so728924ewy.28 for ; Thu, 03 Dec 2009 08:37:04 -0800 (PST) Received: by 10.213.100.139 with SMTP id y11mr96057ebn.83.1259857758765; Thu, 03 Dec 2009 08:29:18 -0800 (PST) Received: from destiny.ordissimo (253.175.70-86.rev.gaoland.net [86.70.175.253]) by mx.google.com with ESMTPS id 13sm1398115ewy.13.2009.12.03.08.29.18 (version=SSLv3 cipher=RC4-MD5); Thu, 03 Dec 2009 08:29:18 -0800 (PST) Date: Thu, 3 Dec 2009 17:27:45 +0100 From: Anisse Astier To: linux-acpi@vger.kernel.org Cc: Carlos Corbacho , Len Brown , Frans Pop , Matthew Garrett Subject: [PATCH] wmi: Free the allocated acpi objects through wmi_get_event_data Message-ID: <20091203172745.02f66489@destiny.ordissimo> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.12; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index 5f4a0e6..cd48a2f 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -121,6 +121,7 @@ static void dell_wmi_notify(u32 value, void *context) printk(KERN_INFO "dell-wmi: Unknown key %x pressed\n", buffer[1] & 0xFFFF); } + kfree(obj); } static int __init dell_wmi_input_setup(void) diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c index 8868610..8eba327 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -316,6 +316,8 @@ static void hp_wmi_notify(u32 value, void *context) eventcode); } else printk(KERN_INFO "HP WMI: Unknown response received\n"); + + kfree(obj); } static int __init hp_wmi_input_setup(void) diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 177f8d7..b486048 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -511,7 +511,7 @@ EXPORT_SYMBOL_GPL(wmi_remove_notify_handler); * wmi_get_event_data - Get WMI data associated with an event * * @event - Event to find - * &out - Buffer to hold event data + * &out - Buffer to hold event data. out.pointer should be freed with kfree() * * Returns extra data associated with an event in WMI. */