Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b366e2f authored by Fiodor Suietov's avatar Fiodor Suietov Committed by Len Brown
Browse files

ACPICA: fix for object premature deletion



Fix for object premature deletion after CopyObject
on Operation Region (BZ 350)

Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 0654a6d3
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -719,6 +719,15 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc,
		acpi_ut_add_reference(source_desc->reference.object);
		break;

	case ACPI_TYPE_REGION:
		/*
		 * We copied the Region Handler, so we now must add a reference
		 */
		if (dest_desc->region.handler) {
			acpi_ut_add_reference(dest_desc->region.handler);
		}
		break;

	default:
		/* Nothing to do for other simple objects */
		break;