diff options
author | Oz Linden <oz@lindenlab.com> | 2017-11-03 16:19:54 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2017-11-03 16:19:54 -0400 |
commit | 1a09fee8e1f9ca5319276ede10e36cffe7284a1a (patch) | |
tree | 32edfdd7b1668bd8cf7f05ed3c436173b57aafa2 | |
parent | 69c6d6fc6305e7640c2a5523fecf258d0daebe4b (diff) |
[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.
(from Kitty Barnett)
-rw-r--r-- | indra/newview/llvoicevivox.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp index 285ce298b0..eda3bfe0ee 100644 --- a/indra/newview/llvoicevivox.cpp +++ b/indra/newview/llvoicevivox.cpp @@ -5694,7 +5694,8 @@ void LLVivoxVoiceClient::deleteAllSessions() while (!mSessionsByHandle.empty()) { - deleteSession(mSessionsByHandle.begin()->second); + const sessionStatePtr_t session = mSessionsByHandle.begin()->second; + deleteSession(session); } } |