diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index cb27df4d65a47f..498ee390d7e73b 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -127,8 +127,8 @@ CHIP_ERROR Engine::BuildSingleReportDataAttributeDataList(ReportDataMessage::Bui // SetDirty's inject path into GlobalDirtySet path that don't have the particular nodeId, // need to inject nodeId from subscribed path here. ClusterInfo dirtyPath = *path; - dirtyPath->mNodeId = clusterInfo->mNodeId; - err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, dirtyPath); + dirtyPath->mNodeId = clusterInfo->mNodeId; + err = RetrieveClusterData(apReadHandler->GetFabricIndex(), attributeDataList, dirtyPath); } else if (path->IsAttributePathSupersetOf(*clusterInfo)) {