projects
/
platform
/
kernel
/
linux-3.10.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a815ab8
)
thinkpad_acpi: fix possible NULL pointer dereference if kstrdup failed
author
Cyrill Gorcunov
<gorcunov@gmail.com>
Fri, 18 Apr 2008 20:27:29 +0000
(13:27 -0700)
committer
Len Brown
<len.brown@intel.com>
Tue, 29 Apr 2008 14:10:03 +0000
(10:10 -0400)
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/misc/thinkpad_acpi.c
patch
|
blob
|
history
diff --git
a/drivers/misc/thinkpad_acpi.c
b/drivers/misc/thinkpad_acpi.c
index
6cb7812
..
31115c9
100644
(file)
--- a/
drivers/misc/thinkpad_acpi.c
+++ b/
drivers/misc/thinkpad_acpi.c
@@
-5826,7
+5826,7
@@
static void __init get_thinkpad_model_data(struct thinkpad_id_data *tp)
tp->model_str = kstrdup(dmi_get_system_info(DMI_PRODUCT_VERSION),
GFP_KERNEL);
- if (strnicmp(tp->model_str, "ThinkPad", 8) != 0) {
+ if (
tp->model_str &&
strnicmp(tp->model_str, "ThinkPad", 8) != 0) {
kfree(tp->model_str);
tp->model_str = NULL;
}