From 4332870224108b0d9bdd5e451357997e4501cf8b Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Mon, 19 Jul 2021 23:49:41 +0100 Subject: [PATCH] Prevent use of invalid pointer in MessageCounterManager::OnResponseTimeout (#8392) --- src/protocols/secure_channel/MessageCounterManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/protocols/secure_channel/MessageCounterManager.cpp b/src/protocols/secure_channel/MessageCounterManager.cpp index 62fbf8e2ae355a..3fa3d428dc18b4 100644 --- a/src/protocols/secure_channel/MessageCounterManager.cpp +++ b/src/protocols/secure_channel/MessageCounterManager.cpp @@ -53,6 +53,7 @@ void MessageCounterManager::Shutdown() if (mExchangeMgr != nullptr) { mExchangeMgr->UnregisterUnsolicitedMessageHandlerForType(Protocols::SecureChannel::MsgType::MsgCounterSyncReq); + mExchangeMgr->CloseAllContextsForDelegate(this); mExchangeMgr = nullptr; } }