From: Axel Lin Date: Tue, 20 Jul 2010 22:19:53 +0000 (-0700) Subject: acer-wmi: fix memory leaks in wmab_execute error path X-Git-Tag: v2.6.36-rc1~579^2~34 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7677fbdff16f5b817bc3dc5d194a8b3350f8f9cb;p=pandora-kernel.git acer-wmi: fix memory leaks in wmab_execute error path 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. [akpm@linux-foundation.org: avoid multiple return points, remove unneeded cast, remove unneeded initialisation of `status'] Signed-off-by: Axel Lin Acked-by: Carlos Corbacho Cc: Matthew Garrett Cc: Thomas Renninger Cc: Alan Jenkins Signed-off-by: Andrew Morton Signed-off-by: Matthew Garrett --- Reading git-diff-tree failed