Commit 17eb1fca authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

+ when storing the address in the cache fails, cleanup the resolved address

properly
+ delete trailing whitespace
parent 2511d119
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -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);