summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-08-26 09:15:03 +0200
committerMatthew Garrett <mjg@redhat.com>2010-10-21 15:36:47 +0200
commit3d2c63eb5e0abfd06b19928c8ed43020b3451a3c (patch)
tree785fd8b6ab560a06f78fe29d22599990a09c3dbc /drivers/platform
parentWMI: do not leak memory in parse_wdg() (diff)
downloadlinux-3d2c63eb5e0abfd06b19928c8ed43020b3451a3c.tar.xz
linux-3d2c63eb5e0abfd06b19928c8ed43020b3451a3c.zip
WMI: fix potential NULL pointer dereference
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/wmi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index a24a4b52c919..81552bca6ae4 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -824,6 +824,8 @@ static acpi_status parse_wdg(acpi_handle handle)
return status;
obj = (union acpi_object *) out.pointer;
+ if (!obj)
+ return AE_ERROR;
if (obj->type != ACPI_TYPE_BUFFER) {
status = AE_ERROR;