[PATCH 2/3] x86: asus-laptop: fix invalid point access

From: Libo Chen
Date: Sun May 19 2013 - 22:30:49 EST



asus->name is null or point to const string,so it is not suitable to kfree it.

Signed-off-by: Libo Chen <libo.chen@xxxxxxxxxx>
---
drivers/platform/x86/asus-laptop.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 0eea09c..8e268da 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -1935,7 +1935,6 @@ fail_input:
fail_backlight:
asus_platform_exit(asus);
fail_platform:
- kfree(asus->name);
kfree(asus);

return result;
--
1.8.1.2






--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/