diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index cd0f9b05472f44..f27a52de690597 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -104,11 +104,11 @@ CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, Attribu }); } - auto endpoints = InteractionModelEngine::GetInstance()->GetDataModelProvider()->GetEndpoints(); + auto endpointsIterator = InteractionModelEngine::GetInstance()->GetDataModelProvider()->GetEndpoints(); - VerifyOrReturnError(endpoints->SeekTo(endpoint), CHIP_ERROR_KEY_NOT_FOUND); + VerifyOrReturnError(endpointsIterator->SeekTo(endpoint), CHIP_ERROR_KEY_NOT_FOUND); - auto endpointInfo = endpoints->GetMetadata(); + auto endpointInfo = endpointsIterator->GetMetadata(); // if SEEK returns true, metadata MUST be valid VerifyOrReturnError(endpointInfo.has_value(), CHIP_ERROR_INTERNAL);