ACPICA: Fix memory leak on unusual memory leak

Fixes a single-object memory leak on a store-to-reference method
invocation. ACPICA BZ 1439.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Bob Moore 2018-03-14 16:13:01 -07:00 committed by Rafael J. Wysocki
parent 87cd826b59
commit 1c29c372b2
1 changed files with 4 additions and 0 deletions

View File

@ -890,6 +890,10 @@ acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
ACPI_POSSIBLE_METHOD_CALL);
if (arg->common.aml_opcode == AML_INT_METHODCALL_OP) {
/* Free method call op and corresponding namestring sub-ob */
acpi_ps_free_op(arg->common.value.arg);
acpi_ps_free_op(arg);
arg = NULL;
walk_state->arg_count = 1;