CURLOPT_RESOLVE: avoid adding already present host names

The load host names to DNS cache function was moved to hostip.c and it
now makes sure to not add host names that already are present in the
cache. It would previously lead to memory leaks when for example using
the --resolve and multiple URLs on the command line.
This commit is contained in:
Daniel Stenberg
2011-12-31 10:28:10 +01:00
parent 9e3f8c4850
commit 5e0a44e4d5
3 changed files with 69 additions and 47 deletions

View File

@@ -205,4 +205,6 @@ CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers);
*/
void Curl_hostcache_destroy(struct SessionHandle *data);
CURLcode Curl_loadhostpairs(struct SessionHandle *data);
#endif /* HEADER_CURL_HOSTIP_H */