summaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-03-05 03:15:19 +0000
committerYang Tse <yangsita@gmail.com>2010-03-05 03:15:19 +0000
commitf4551a967820ab2be76fd5d600fbce32cd290e62 (patch)
tree63539c815d1817e8562753bf6ca98b6d41dece14 /lib/url.c
parent52f088ec1bec69e35efd2ac3bb5b95d9ce82bd46 (diff)
downloadcurl-f4551a967820ab2be76fd5d600fbce32cd290e62.tar.gz
Constantine Sapuntzakis detected and fixed a double free in builds done
with threaded resolver enabled (Windows default configuration) that would get triggered when a curl handle is closed while doing DNS resolution.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/url.c b/lib/url.c
index 887c06a84..fe9c322bf 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2490,12 +2490,11 @@ static void conn_free(struct connectdata *conn)
Curl_llist_destroy(conn->done_pipe, NULL);
/* possible left-overs from the async name resolvers */
-#if defined(CURLRES_ASYNCH)
- Curl_safefree(conn->async.hostname);
- Curl_safefree(conn->async.os_specific);
#if defined(CURLRES_THREADED)
Curl_destroy_thread_data(&conn->async);
-#endif
+#elif defined(CURLRES_ASYNCH)
+ Curl_safefree(conn->async.hostname);
+ Curl_safefree(conn->async.os_specific);
#endif
Curl_free_ssl_config(&conn->ssl_config);