diff options
author | Bob Moore <robert.moore@intel.com> | 2009-04-22 12:57:40 +0800 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-05-27 00:30:49 -0400 |
commit | 65259094c3e038519a2d8fa6fbc6256f04ad6535 (patch) | |
tree | 57a2dce6aa258731904e6550268418274a92448e /drivers/acpi | |
parent | b21245a85e62ea7eeb5b7562ce98cf8b0aecbd26 (diff) | |
download | blackbird-op-linux-65259094c3e038519a2d8fa6fbc6256f04ad6535.tar.gz blackbird-op-linux-65259094c3e038519a2d8fa6fbc6256f04ad6535.zip |
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 <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/nspredef.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index d9e8cbc6e679..7f8e066b12a3 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); } |