From: Axel Lin Date: Tue, 20 Jul 2010 22:19:41 +0000 (-0700) Subject: asus_acpi: fix a memory leak in asus_hotk_get_info() X-Git-Tag: v2.6.36-rc1~579^2~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d47bb5b227f103f9bc0e572f478ac6b2a08fc2b2;p=pandora-kernel.git asus_acpi: fix a memory leak in asus_hotk_get_info() In the case of no match ( hotk->model == END_MODEL ), model sholud be kfreed before return AE_OK. This patch includes below fixes: 1. adds a missing kfree(model) before return AE_OK. 2. asus_hotk_get_info should return int, thus return 0 instead of AE_OK. Signed-off-by: Axel Lin Cc: Corentin Chary Cc: Karol Kozimor Cc: Matthew Garrett Cc: Len Brown Signed-off-by: Andrew Morton Signed-off-by: Matthew Garrett --- Reading git-diff-tree failed