Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[pandora-kernel.git] / drivers / acpi / acpica / nsobject.c
index 3eb20bf..41a9213 100644 (file)
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2008, Intel Corp.
+ * Copyright (C) 2000 - 2010, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -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;