ACPICA: Namespace: add check to avoid null pointer dereference

ACPICA commit 7586a625f9c34c3169efd88470192bf63119e31a

Some ACPICA userspace tools call acpi_ut_subsystem_shutdown() during
cleanup and dereference a null pointer when cleaning up the
namespace.

Link: https://github.com/acpica/acpica/commit/7586a625
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Erik Schmauss 2019-04-08 13:42:29 -07:00 committed by Rafael J. Wysocki
parent 985d5124bf
commit df9271d69f
1 changed files with 4 additions and 0 deletions

View File

@ -74,6 +74,10 @@ void acpi_ns_delete_node(struct acpi_namespace_node *node)
ACPI_FUNCTION_NAME(ns_delete_node);
if (!node) {
return_VOID;
}
/* Detach an object if there is one */
acpi_ns_detach_object(node);