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 Mar 7, 2023
1 parent a566243 commit c69e90d
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 c69e90d

Please sign in to comment.