From 3d2c63eb5e0abfd06b19928c8ed43020b3451a3c Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 26 Aug 2010 00:15:03 -0700 Subject: [PATCH] WMI: fix potential NULL pointer dereference Signed-off-by: Dmitry Torokhov Signed-off-by: Matthew Garrett --- drivers/platform/x86/wmi.c | 2 ++ 1 file changed, 2 insertions(+) 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;