From 7758a2c342e784e4032c07e1928c1c2cef5c7e31 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 12 Oct 2017 22:46:11 +0200 Subject: [PATCH] [FIXED] Access (read) violation using a LLVivoxVoiceClient::sessionState() after it's been free'ed The shared pointer is passed by reference to LLVivoxVoiceClient::deleteSession() where mSessionsByHandle.erase(iter) removes the last reference causing it to destruct while still being accessed later on in the function. --- indra/newview/llvoicevivox.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 6052d59ce3..bac5e68ac1 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5670,7 +5670,8 @@ void LLVivoxVoiceClient::deleteAllSessions() while (!mSessionsByHandle.empty()) { - deleteSession(mSessionsByHandle.begin()->second); + const sessionStatePtr_t session = mSessionsByHandle.begin()->second; + deleteSession(session); } }