From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlos Corbacho Subject: Re: [PATCH] acer-wmi: fix memory leaks in wmab_execute error path Date: Fri, 9 Jul 2010 21:53:55 +0100 Message-ID: <201007092153.55715.carlos@strangeworlds.co.uk> References: <1278647475.26099.2.camel@mola> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ww0-f44.google.com ([74.125.82.44]:60608 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754960Ab0GIUyJ (ORCPT ); Fri, 9 Jul 2010 16:54:09 -0400 In-Reply-To: <1278647475.26099.2.camel@mola> Sender: platform-driver-x86-owner@vger.kernel.org List-ID: To: Axel Lin Cc: linux-kernel , Matthew Garrett , Thomas Renninger , Alan Jenkins , platform-driver-x86@vger.kernel.org On Friday 09 July 2010 04:51:15 Axel Lin wrote: > When acpi_evaluate_object() is passed ACPI_ALLOCATE_BUFFER, > the caller must kfree the returned buffer if AE_OK is returned. > > Call Trace: > wmab_execute > -> wmi_evaluate_method > -> acpi_evaluate_object > > Thus if callers of wmab_execute() pass ACPI_ALLOCATE_BUFFER, > the return buffer must be kfreed if wmab_execute return AE_OK. > > Signed-off-by: Axel Lin Acked-by: Carlos Corbacho -- E-Mail: carlos@strangeworlds.co.uk Web: strangeworlds.co.uk GPG Key ID: 0x23EE722D