dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Bob Moore 2009-04-22 12:57:40 +08:00 committed by Len Brown
parent b21245a85e
commit 65259094c3
1 changed files with 2 additions and 5 deletions

View File

@ -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);
}