cURL cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1431 removing names from DNS cache with CURLOPT_RESOLVE is not implemented

From: ygrek <ygreks_at_users.sf.net>
Date: Tue, 07 Oct 2014 10:01:37 +0000

Imagine the application that has one multi handle. For each easy handle it will add DNS entries with CURLOPT_RESOLVE (host:port:addr) and after transfer complete - remove them with CURLOPT_RESOLVE (-host:port). In this case hostcache will grow indefinitely. This is technically not a memory leak because memory _will_ be cleaned up when multi handle is destroyed, just that the hostcache grows large and takes more and more time to iterate through (e.g. with Curl_hostcache_prune).
As for the patch - I am not exactly sure how DNS cache locking is working.. Is it just a matter of calling Curl_resolv_unlock in loadhostpairs? I will try to make a patch..

---
** [bugs:#1431] removing names from DNS cache with CURLOPT_RESOLVE is not implemented**
**Status:** open
**Labels:** dns memory leak 
**Created:** Tue Oct 07, 2014 09:19 AM UTC by ygrek
**Last Updated:** Tue Oct 07, 2014 09:47 AM UTC
**Owner:** Daniel Stenberg
Removing names from DNS cache with CURLOPT_RESOLVE is not implemented (see TODO in Curl_loadhostpairs). With the fix 31860ab for https://sourceforge.net/p/curl/bugs/1327/ it means that constantly adding and deleting hostcache entries with CURLOPT_RESOLVE creates a memory leak, as such entries are never removed (nor by request nor automatically).
---
Sent from sourceforge.net because curl-tracker@cool.haxx.se is subscribed to https://sourceforge.net/p/curl/bugs/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/curl/admin/bugs/options.  Or, if this is a mailing list, you can unsubscribe from the mailing list.
Received on 2014-10-07

These mail archives are generated by hypermail.