summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/acpica/nsobject.c')
-rw-r--r--drivers/acpi/acpica/nsobject.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/nsobject.c b/drivers/acpi/acpica/nsobject.c
index 3eb20bfda9d8..60f3af08d28c 100644
--- a/drivers/acpi/acpica/nsobject.c
+++ b/drivers/acpi/acpica/nsobject.c
@@ -213,6 +213,15 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node)
return_VOID;
}
+ if (node->flags & ANOBJ_ALLOCATED_BUFFER) {
+
+ /* Free the dynamic aml buffer */
+
+ if (obj_desc->common.type == ACPI_TYPE_METHOD) {
+ ACPI_FREE(obj_desc->method.aml_start);
+ }
+ }
+
/* Clear the entry in all cases */
node->object = NULL;
OpenPOWER on IntegriCloud