Skip to content

Commit

Permalink
[Bindings] Add a missing null check (#25534)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Jan 23, 2024
1 parent efab859 commit 2213397
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/app/clusters/bindings/BindingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ CHIP_ERROR BindingManager::EstablishConnection(const ScopedNodeId & nodeId)

mLastSessionEstablishmentError = CHIP_NO_ERROR;
auto * connectionCallback = Platform::New<ConnectionCallback>(*this);
VerifyOrReturnError(connectionCallback != nullptr, CHIP_ERROR_NO_MEMORY);

mInitParams.mCASESessionManager->FindOrEstablishSession(nodeId, connectionCallback->GetOnDeviceConnected(),
connectionCallback->GetOnDeviceConnectionFailure());
if (mLastSessionEstablishmentError == CHIP_ERROR_NO_MEMORY)
Expand Down

0 comments on commit 2213397

Please sign in to comment.