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
@ -1,8 +1,8 @@
|
||||
/***************************************************************************
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* _ _ ____ _
|
||||
* Project ___| | | | _ \| |
|
||||
* / __| | | | |_) | |
|
||||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
@ -10,7 +10,7 @@
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
* are also available at http://curl.haxx.se/docs/copyright.html.
|
||||
*
|
||||
*
|
||||
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
||||
* copies of the Software, and permit persons to whom the Software is
|
||||
* furnished to do so, under the terms of the COPYING 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);
|
||||
|
Loading…
Reference in New Issue
Block a user