#1150 CURLOPTION_RESOLVE memory leak

closed-fixed
libcurl (356)
5
2013-06-21
2012-10-08
alex gruz
No

Bug: http://curl.haxx.se/bug/view.cgi?id=3463121 was fixed only for easy interface. It still exists when I use CURLOPTION_RESOLVE with easy handles that then added to multi session.

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2012-10-08

    Thanks for your report, do you by any chance have an example code that repeats this leak?

     
  • alex gruz

    alex gruz - 2012-10-09

    modified multi-post.c too show memory leak

     
  • alex gruz

    alex gruz - 2012-10-09

    I've added an example. Actually this is 'multi-post.c' example from curl site with added line:

    curl_easy_setopt(handles[HTTP_HANDLE], CURLOPT_RESOLVE, dns_cache_list)

    Bugfix for http://curl.haxx.se/bug/view.cgi?id=3463121 works only if i use 'easy' interface,
    see url.c file:

    if(data->dns.hostcachetype == HCACHE_PRIVATE)
    Curl_hostcache_destroy(data);

    In case of 'multi' interface data->dns.hostcachetype is not of type HCACHE_PRIVATE. That's why that problem remians.

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-10-09

    Thanks, I can repeat the leak...

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-11-18
    • status: open --> open-fixed
     
  • Daniel Stenberg

    Daniel Stenberg - 2012-11-18

    I've attached my suggested fix (and a new test case). Would appreciate if you can try it out and see that it fixes things in your end too!

     
  • Daniel Stenberg

    Daniel Stenberg - 2012-11-18
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks