Skip to content

Commit

Permalink
ACPICA: Fixed a couple memory leaks associated with "implicit return"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lin Ming authored and Len Brown committed Oct 23, 2008
1 parent 68e125c commit d8a0ec9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions drivers/acpi/dispatcher/dsmethod.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {

Expand Down
4 changes: 3 additions & 1 deletion drivers/acpi/parser/psparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,10 +635,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);
}
}

Expand Down

0 comments on commit d8a0ec9

Please sign in to comment.