Skip to content

Commit 1418088

Browse files
vivien-applepull[bot]
authored andcommitted
[Bindings] Add a missing null check (#25534)
1 parent c3f3a04 commit 1418088

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/app/clusters/bindings/BindingManager.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ CHIP_ERROR BindingManager::EstablishConnection(const ScopedNodeId & nodeId)
108108

109109
mLastSessionEstablishmentError = CHIP_NO_ERROR;
110110
auto * connectionCallback = Platform::New<ConnectionCallback>(*this);
111+
VerifyOrReturnError(connectionCallback != nullptr, CHIP_ERROR_NO_MEMORY);
112+
111113
mInitParams.mCASESessionManager->FindOrEstablishSession(nodeId, connectionCallback->GetOnDeviceConnected(),
112114
connectionCallback->GetOnDeviceConnectionFailure());
113115
if (mLastSessionEstablishmentError == CHIP_ERROR_NO_MEMORY)

0 commit comments

Comments
 (0)