From a1b650ad7be4f8ec2fb486244f2f303434d43dfc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 21 Jun 2007 14:23:38 +0000 Subject: =?UTF-8?q?Gerrit=20Bruchh=E4user=20pointed=20out=20a=20warning=20?= =?UTF-8?q?that=20the=20Intel(R)=20Thread=20Checker=20tool=20reports=20and?= =?UTF-8?q?=20it=20was=20indeed=20a=20legitimate=20one=20and=20it=20is=20o?= =?UTF-8?q?ne=20fixed.=20It=20was=20a=20use=20of=20a=20share=20without=20d?= =?UTF-8?q?oing=20the=20proper=20locking=20first.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/url.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/url.c b/lib/url.c index 8165c9298..789959762 100644 --- a/lib/url.c +++ b/lib/url.c @@ -378,8 +378,11 @@ CURLcode Curl_close(struct SessionHandle *data) #endif /* CURL_DOES_CONVERSIONS && HAVE_ICONV */ /* No longer a dirty share, if it exists */ - if (data->share) + if (data->share) { + Curl_share_lock(data, CURL_LOCK_DATA_SHARE, CURL_LOCK_ACCESS_SINGLE); data->share->dirty--; + Curl_share_unlock(data, CURL_LOCK_DATA_SHARE); + } free(data); return CURLE_OK; -- cgit v1.2.3