Skip to content

Commit

Permalink
Update src/app/clusters/scenes-server/SceneTableImpl.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
lpbeliveau-silabs and bzbarsky-apple authored Jun 5, 2023
1 parent 04394f8 commit 939d1ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/clusters/scenes-server/SceneTableImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,8 +741,7 @@ CHIP_ERROR DefaultSceneTableImpl::SceneSaveEFS(SceneTableEntry & scene)
// over-allocation
uint8_t clusterCount = GetClusterCountFromEndpoint();
chip::Platform::ScopedMemoryBuffer<clusterId> cBuffer;
cBuffer.Alloc(clusterCount);
VerifyOrReturnError(nullptr != cBuffer.Get(), CHIP_ERROR_NO_MEMORY);
VerifyOrReturnError(cBuffer.Calloc(clusterCount), CHIP_ERROR_NO_MEMORY);
clusterCount = GetClustersFromEndpoint(cBuffer.Get(), clusterCount);

Span<clusterId> cSpan(cBuffer.Get(), clusterCount);
Expand Down

0 comments on commit 939d1ca

Please sign in to comment.