The acpi_operand_object object's reference count has not been decremented if attached to associated value failed, so may cause this object cannot be released forever, this add acpi_ut_remove_reference() to handle reference decrement. Fixes: 6ccd7b5acc41 ("ACPICA: Disassembler: Add support for Operation Region externals") Signed-off-by: Wang ShaoBo <bobo.shaobowang@xxxxxxxxxx> --- drivers/acpi/acpica/dsfield.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c index de175f1b4beb..3a3d3ab3e2c3 100644 --- a/drivers/acpi/acpica/dsfield.c +++ b/drivers/acpi/acpica/dsfield.c @@ -93,6 +93,9 @@ acpi_ds_create_external_region(acpi_status lookup_status, obj_desc->region.node = *node; status = acpi_ns_attach_object(*node, obj_desc, ACPI_TYPE_REGION); + if (ACPI_FAILURE(status)) + acpi_ut_remove_reference(obj_desc); + return (status); } #endif -- 2.25.1