summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Ming <ming.m.lin@intel.com>2009-01-27 17:38:49 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-02-06 14:00:41 -0800
commit622a88ec79861a7576949142a9191de6f52a6da2 (patch)
treee9b7c25c7ae3c7118bfb02a731e339b66c1dfc0d
parent995e929573c15b2cea0a531c124df3c721fc24d1 (diff)
ACPICA: Fixed a couple memory leaks associated with "implicit return"
commit d8a0ec914afa1a994d2f6184ac4c6668b5f8068f upstream Fixed a couple memory leaks associated with "implicit return" objects when the AML Interpreter slack mode is enabled. http://www.acpica.org/bugzilla/show_bug.cgi?id=349 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Cc: Thomas Renninger <trenn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/acpi/dispatcher/dsmethod.c3
-rw-r--r--drivers/acpi/parser/psparse.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c
index 4613b9ca5792..279a5a60a0dd 100644
--- a/drivers/acpi/dispatcher/dsmethod.c
+++ b/drivers/acpi/dispatcher/dsmethod.c
@@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
NULL);
acpi_ex_enter_interpreter();
}
+
+ acpi_ds_clear_implicit_return(walk_state);
+
#ifdef ACPI_DISASSEMBLER
if (ACPI_FAILURE(status)) {
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
index 15e1702e48d6..a05e2a34d92d 100644
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -641,10 +641,12 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
ACPI_WALK_METHOD_RESTART;
}
} else {
- /* On error, delete any return object */
+ /* On error, delete any return object or implicit return */
acpi_ut_remove_reference(previous_walk_state->
return_desc);
+ acpi_ds_clear_implicit_return
+ (previous_walk_state);
}
}