From 83732a7083ef50ddbf2c0e1e99aed8fe65c6a63a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Mon, 19 Sep 2011 16:39:16 -0500 Subject: SH-2445 Potential fix for crash in LLCurl::Multi::~Multi -- lock sMultiMutex around curl_multi_ calls in LLCurl::Multi destructor --- indra/llmessage/llcurl.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra') diff --git a/indra/llmessage/llcurl.cpp b/indra/llmessage/llcurl.cpp index 280a8942a8..6d9213f51b 100644 --- a/indra/llmessage/llcurl.cpp +++ b/indra/llmessage/llcurl.cpp @@ -553,6 +553,11 @@ LLCurl::Multi::~Multi() { llassert(isStopped()); + if (LLCurl::sMultiThreaded) + { + LLCurl::Easy::sMultiMutex->lock(); + } + delete mSignal; mSignal = NULL; @@ -573,6 +578,11 @@ LLCurl::Multi::~Multi() check_curl_multi_code(curl_multi_cleanup(mCurlMultiHandle)); --gCurlMultiCount; + + if (LLCurl::sMultiThreaded) + { + LLCurl::Easy::sMultiMutex->unlock(); + } } CURLMsg* LLCurl::Multi::info_read(S32* msgs_in_queue) -- cgit v1.2.3