aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-06-21 14:23:38 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-06-21 14:23:38 +0000
commita1b650ad7be4f8ec2fb486244f2f303434d43dfc (patch)
tree9a9b01cca304646e7af6e23a0222671fe0922d0e /lib
parentd978f85d553686714ce408e90280cbcce692f5d4 (diff)
Gerrit Bruchhäuser pointed out a warning that the Intel(R) Thread Checker
tool reports and it was indeed a legitimate one and it is one fixed. It was a use of a share without doing the proper locking first.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c5
1 files changed, 4 insertions, 1 deletions
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;