From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Garrett Subject: Re: [PATCH] wmi: fix a memory leak in wmi_notify_debug Date: Thu, 1 Jul 2010 14:51:00 +0100 Message-ID: <20100701135100.GB31804@srcf.ucam.org> References: <1277688645.22992.2.camel@mola> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from cavan.codon.org.uk ([93.93.128.6]:54608 "EHLO cavan.codon.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755509Ab0GANvL (ORCPT ); Thu, 1 Jul 2010 09:51:11 -0400 Content-Disposition: inline In-Reply-To: <1277688645.22992.2.camel@mola> Sender: platform-driver-x86-owner@vger.kernel.org List-ID: To: Axel Lin Cc: linux-kernel , Carlos Corbacho , Len Brown , Thomas Renninger , Andrew Morton , platform-driver-x86@vger.kernel.org On Mon, Jun 28, 2010 at 09:30:45AM +0800, Axel Lin wrote: > When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, > the caller must kfree the returned buffer if AE_OK is returned. > > The callers of wmi_get_event_data() pass ACPI_ALLOCATE_BUFFER, > and thus must check its return value before accessing > or kfree() on the buffer. > > This patch adds return value checking for wmi_get_event_data() > and adds a missing kfree(obj) in the end of wmi_notify_debug Applied, thanks. -- Matthew Garrett | mjg59@srcf.ucam.org