mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:53:37 +03:00
- Jeff Pohlmeyer identified two problems: first a rather obscure problem with
the multi interface and connection re-use that could make a curl_multi_remove_handle() ruin a pointer in another handle. The second problem was less of an actual problem but more of minor quirk: the re-using of connections wasn't properly checking if the connection was marked for closure.
This commit is contained in:
parent
300cbc2e21
commit
cbf58d88d0
6 changed files with 30 additions and 20 deletions
|
|
@ -542,11 +542,10 @@ CURLMcode curl_multi_remove_handle(CURLM *multi_handle,
|
|||
easy->easy_handle->dns.hostcachetype = HCACHE_NONE;
|
||||
}
|
||||
|
||||
/* if we have a connection we must call Curl_done() here so that we
|
||||
don't leave a half-baked one around */
|
||||
if(easy->easy_conn) {
|
||||
/* Set up the association right */
|
||||
easy->easy_conn->data = easy->easy_handle;
|
||||
/* we must call Curl_done() here (if we still "own it") so that we don't
|
||||
leave a half-baked one around */
|
||||
if(easy->easy_conn &&
|
||||
(easy->easy_conn->data == easy->easy_handle)) {
|
||||
|
||||
/* Curl_done() clears the conn->data field to lose the association
|
||||
between the easy handle and the connection */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue