summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-09-19 16:39:16 -0500
committerDave Parks <davep@lindenlab.com>2011-09-19 16:39:16 -0500
commit83732a7083ef50ddbf2c0e1e99aed8fe65c6a63a (patch)
tree60a99eab18c5afef5b01199f6f1d867dba42e35b /indra/llmessage
parent2fba01d160716b886a7dfc0c86abda767a25d23f (diff)
SH-2445 Potential fix for crash in LLCurl::Multi::~Multi -- lock sMultiMutex around curl_multi_ calls in LLCurl::Multi destructor
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llcurl.cpp10
1 files changed, 10 insertions, 0 deletions
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)