From patchwork Tue Dec 15 09:50:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anisse Astier X-Patchwork-Id: 67583 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nBF9rf0F030239 for ; Tue, 15 Dec 2009 09:53:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759558AbZLOJxk (ORCPT ); Tue, 15 Dec 2009 04:53:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759443AbZLOJxk (ORCPT ); Tue, 15 Dec 2009 04:53:40 -0500 Received: from mail-fx0-f221.google.com ([209.85.220.221]:36834 "EHLO mail-fx0-f221.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752589AbZLOJxi (ORCPT ); Tue, 15 Dec 2009 04:53:38 -0500 Received: by fxm21 with SMTP id 21so4177983fxm.21 for ; Tue, 15 Dec 2009 01:53:37 -0800 (PST) Received: by 10.103.127.36 with SMTP id e36mr1849602mun.122.1260870816715; Tue, 15 Dec 2009 01:53:36 -0800 (PST) Received: from destiny.ordissimo (253.175.70-86.rev.gaoland.net [86.70.175.253]) by mx.google.com with ESMTPS id 23sm3832389mun.41.2009.12.15.01.53.35 (version=SSLv3 cipher=RC4-MD5); Tue, 15 Dec 2009 01:53:36 -0800 (PST) Date: Tue, 15 Dec 2009 10:50:24 +0100 From: Anisse Astier To: linux-acpi@vger.kernel.org, Len Brown Cc: Matthew Garrett , Randy Dunlap , Carlos Corbacho , Frans Pop Subject: [PATCH resend] wmi: Free the allocated acpi objects through wmi_get_event_data Message-ID: <20091215105024.3acad900@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 0f900cc..f235a98 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -180,6 +180,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 c284217..36109e1 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -377,6 +377,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..87f4c97 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -510,8 +510,8 @@ 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 + * @event: Event to find + * @out: Buffer to hold event data. out->pointer should be freed with kfree() * * Returns extra data associated with an event in WMI. */