mirror of
https://github.com/curl/curl.git
synced 2026-07-23 07:47:14 +03:00
Robson Braga Araujo fixed a memory leak when you added an easy handle to a
multi stack and that easy handle had already been used to do one or more easy interface transfers, as then the code threw away the previously used DNS cache without properly freeing it.
This commit is contained in:
parent
094ceeba14
commit
73daf8ce33
3 changed files with 13 additions and 1 deletions
|
|
@ -315,7 +315,12 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
|
|||
easy->easy_handle = easy_handle;
|
||||
multistate(easy, CURLM_STATE_INIT);
|
||||
|
||||
/* for multi interface connections, we share DNS cache automaticly */
|
||||
/* for multi interface connections, we share DNS cache automaticly.
|
||||
First kill the existing one if there is any. */
|
||||
if (easy->easy_handle->hostcache &&
|
||||
easy->easy_handle->hostcache != multi->hostcache)
|
||||
Curl_hash_destroy(easy->easy_handle->hostcache);
|
||||
|
||||
easy->easy_handle->hostcache = multi->hostcache;
|
||||
|
||||
/* We add this new entry first in the list. We make our 'next' point to the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue