Skip to content

Commit

Permalink
ACPICA: Fix memory leak on unusual memory leak
Browse files Browse the repository at this point in the history
[ Upstream commit 1c29c37 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
acpibob authored and gregkh committed May 30, 2018
1 parent bf9b263 commit c827ed0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/acpi/acpica/psargs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c827ed0

Please sign in to comment.