mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
+ when storing the address in the cache fails, cleanup the resolved address
properly + delete trailing whitespace
This commit is contained in:
parent
2511d1193a
commit
17eb1fca7c
@ -136,6 +136,9 @@ void Curl_addrinfo_callback(void *arg, /* "struct connectdata *" */
|
||||
dns = Curl_cache_addr(data, he,
|
||||
conn->async.hostname,
|
||||
conn->async.port);
|
||||
if(!dns)
|
||||
/* failed to store, cleanup and return error */
|
||||
Curl_freeaddrinfo(he);
|
||||
|
||||
if(data->share)
|
||||
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
||||
|
Loading…
Reference in New Issue
Block a user