From: Axel Lin Date: Tue, 29 Jun 2010 03:09:47 +0000 (+0800) Subject: asus-laptop: fix a memory leak in asus_laptop_get_info error path X-Git-Tag: v2.6.36-rc1~579^2~62 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8eca1105fe2039e102c6a8a915d0af937b1b593;p=pandora-kernel.git asus-laptop: fix a memory leak in asus_laptop_get_info error path The callers of write_acpi_int_ret() pass ACPI_ALLOCATE_BUFFER, the caller must kfree the returned buffer if AE_OK is returned. This patch adds a missing kfree(buffer.pointer) before return -ENOMEM if kstrdup fail. Signed-off-by: Axel Lin Acked-by: Corentin Chary Signed-off-by: Matthew Garrett --- Reading git-diff-tree failed