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 Aug 22, 2023
1 parent afaad0a commit 2308616
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 2308616

Please sign in to comment.