diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-11-15 20:40:27 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-11-15 20:40:27 +0000 |
| commit | de06c6b7e0851b337ee530b0ab8818f4216b06b2 (patch) | |
| tree | 393e1854c22739c2db6213f80e859a02e4223818 /source/components/namespace/nsalloc.c | |
| parent | a6028f7332dbf61541a4482e402bf346dad53118 (diff) | |
Notes
Diffstat (limited to 'source/components/namespace/nsalloc.c')
| -rw-r--r-- | source/components/namespace/nsalloc.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c index 09b42f5604aa..38ce8fce6095 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 */ |
