1
0
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:
Daniel Stenberg 2004-05-18 07:35:37 +00:00
parent 2511d1193a
commit 17eb1fca7c

View File

@ -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);