summaryrefslogtreecommitdiffstats
path: root/source/components/namespace/nsalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/namespace/nsalloc.c')
-rw-r--r--source/components/namespace/nsalloc.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c
index 09b42f5..38ce8fc 100644
--- a/source/components/namespace/nsalloc.c
+++ b/source/components/namespace/nsalloc.c
@@ -121,6 +121,7 @@ AcpiNsDeleteNode (
ACPI_NAMESPACE_NODE *Node)
{
ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT *NextDesc;
ACPI_FUNCTION_NAME (NsDeleteNode);
@@ -131,12 +132,13 @@ AcpiNsDeleteNode (
AcpiNsDetachObject (Node);
/*
- * Delete an attached data object if present (an object that was created
- * and attached via AcpiAttachData). Note: After any normal object is
- * detached above, the only possible remaining object is a data object.
+ * Delete an attached data object list if present (objects that were
+ * attached via AcpiAttachData). Note: After any normal object is
+ * detached above, the only possible remaining object(s) are data
+ * objects, in a linked list.
*/
ObjDesc = Node->Object;
- if (ObjDesc &&
+ while (ObjDesc &&
(ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA))
{
/* Invoke the attached data deletion handler if present */
@@ -146,7 +148,16 @@ AcpiNsDeleteNode (
ObjDesc->Data.Handler (Node, ObjDesc->Data.Pointer);
}
+ NextDesc = ObjDesc->Common.NextObject;
AcpiUtRemoveReference (ObjDesc);
+ ObjDesc = NextDesc;
+ }
+
+ /* Special case for the statically allocated root node */
+
+ if (Node == AcpiGbl_RootNode)
+ {
+ return;
}
/* Now we can delete the node */
OpenPOWER on IntegriCloud