From 409f2a041f752ef635354e1dc7b2759fcd7088d6 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 18 Nov 2012 16:17:37 +0100 Subject: fixed memory leak: CURLOPT_RESOLVE with multi interface DNS cache entries populated with CURLOPT_RESOLVE were not properly freed again when done using the multi interface. Test case 1502 added to verify. Bug: http://curl.haxx.se/bug/view.cgi?id=3575448 Reported by: Alex Gruz --- lib/hostip.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/hostip.h') diff --git a/lib/hostip.h b/lib/hostip.h index 12fb80f54..de71f54f4 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -200,11 +200,19 @@ extern sigjmp_buf curl_jmpenv; */ CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers); +/* + * Clean off entries from the cache + */ +void Curl_hostcache_clean(struct SessionHandle *data); + /* * Destroy the hostcache of this handle. */ void Curl_hostcache_destroy(struct SessionHandle *data); +/* + * Populate the cache with specified entries from CURLOPT_RESOLVE. + */ CURLcode Curl_loadhostpairs(struct SessionHandle *data); #endif /* HEADER_CURL_HOSTIP_H */ -- cgit v1.2.3