Commit d8a0ec91 authored by Lin Ming's avatar Lin Ming Committed by Len Brown

ACPICA: Fixed a couple memory leaks associated with "implicit return"

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=349Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 68e125c4
...@@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) ...@@ -103,6 +103,9 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
NULL); NULL);
acpi_ex_enter_interpreter(); acpi_ex_enter_interpreter();
} }
acpi_ds_clear_implicit_return(walk_state);
#ifdef ACPI_DISASSEMBLER #ifdef ACPI_DISASSEMBLER
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
......
...@@ -635,10 +635,12 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state) ...@@ -635,10 +635,12 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
ACPI_WALK_METHOD_RESTART; ACPI_WALK_METHOD_RESTART;
} }
} else { } else {
/* On error, delete any return object */ /* On error, delete any return object or implicit return */
acpi_ut_remove_reference(previous_walk_state-> acpi_ut_remove_reference(previous_walk_state->
return_desc); return_desc);
acpi_ds_clear_implicit_return
(previous_walk_state);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment