From: Bob Moore Date: Wed, 22 Apr 2009 04:57:40 +0000 (+0800) Subject: ACPICA: Fix possible dereference of null pointer X-Git-Tag: v2.6.31-rc1~319^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65259094c3e038519a2d8fa6fbc6256f04ad6535;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ACPICA: Fix possible dereference of null pointer Fix dereference of possibly null pointer "Predefined" in the case where the method is not one of the predefined methods. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index d9e8cbc..7f8e066 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c @@ -144,7 +144,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, pathname = acpi_ns_get_external_pathname(node); if (!pathname) { - pathname = ACPI_CAST_PTR(char, predefined->info.name); + return AE_OK; /* Could not get pathname, ignore */ } /* @@ -230,10 +230,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, } exit: - if (pathname != predefined->info.name) { - ACPI_FREE(pathname); - } - + ACPI_FREE(pathname); return (status); }