mirror of
https://github.com/moparisthebest/curl
synced 2025-01-03 18:08:02 -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,
|
dns = Curl_cache_addr(data, he,
|
||||||
conn->async.hostname,
|
conn->async.hostname,
|
||||||
conn->async.port);
|
conn->async.port);
|
||||||
|
if(!dns)
|
||||||
|
/* failed to store, cleanup and return error */
|
||||||
|
Curl_freeaddrinfo(he);
|
||||||
|
|
||||||
if(data->share)
|
if(data->share)
|
||||||
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
||||||
|
Loading…
Reference in New Issue
Block a user