diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-08-26 09:15:03 +0200 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2010-10-21 15:36:47 +0200 |
commit | 3d2c63eb5e0abfd06b19928c8ed43020b3451a3c (patch) | |
tree | 785fd8b6ab560a06f78fe29d22599990a09c3dbc /drivers/platform/x86/wmi.c | |
parent | WMI: do not leak memory in parse_wdg() (diff) | |
download | linux-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/x86/wmi.c')
-rw-r--r-- | drivers/platform/x86/wmi.c | 2 |
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; |