From: Bob Moore Date: Wed, 14 Mar 2018 23:13:01 +0000 (-0700) Subject: ACPICA: Fix memory leak on unusual memory leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c827ed01821da3357ce2781c386c1d8471349fdd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ACPICA: Fix memory leak on unusual memory leak [ Upstream commit 1c29c372b2d1d2415601041532745ce859f24126 ] Fixes a single-object memory leak on a store-to-reference method invocation. ACPICA BZ 1439. Signed-off-by: Bob Moore Signed-off-by: Erik Schmauss Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index eb9dfaca555f..11ce4e5d10e2 100644 --- a/drivers/acpi/acpica/psargs.c +++ b/drivers/acpi/acpica/psargs.c @@ -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;