diff --git a/src/protocols/secure_channel/CASESession.cpp b/src/protocols/secure_channel/CASESession.cpp index 72f1823bf0dc11..2c26c89039a6d5 100644 --- a/src/protocols/secure_channel/CASESession.cpp +++ b/src/protocols/secure_channel/CASESession.cpp @@ -1065,10 +1065,10 @@ CHIP_ERROR CASESession::SendSigma3() ChipLogDetail(SecureChannel, "Sending Sigma3"); - VerifyOrExit(icacBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrExit(icacBuf.Alloc(kMaxCHIPCertLength), err = CHIP_ERROR_NO_MEMORY); icaCert = MutableByteSpan{ icacBuf.Get(), kMaxCHIPCertLength }; - VerifyOrExit(nocBuf.Alloc(kMaxCHIPCertLength), CHIP_ERROR_NO_MEMORY); + VerifyOrExit(nocBuf.Alloc(kMaxCHIPCertLength), err = CHIP_ERROR_NO_MEMORY); nocCert = MutableByteSpan{ nocBuf.Get(), kMaxCHIPCertLength }; VerifyOrExit(mFabricsTable != nullptr, err = CHIP_ERROR_INCORRECT_STATE);