Menu

#1073 CURLOPTION_RESOLVE memory leak

closed-fixed
libcurl (356)
5
2013-06-21
2011-12-21
tw84452852
No

recently,I use CURLOPTION_RESOLVE to add dns cache,but i found that the dns cache i add to doesn't be freed, so have memory leak.After looking at the source code, i found the reason that the dns cache's inuse isn't 0,So i try to change to init it to 0 when cache be added to the global hash table,and it work well.

Discussion

  • Daniel Stenberg

    Daniel Stenberg - 2011-12-21

    Confirmed. I've now written a test case that repeats a leak. I'm working on fix. Thanks for the report!

     
  • Daniel Stenberg

    Daniel Stenberg - 2011-12-21
    • milestone: --> bad_behaviour
     
  • Daniel Stenberg

    Daniel Stenberg - 2011-12-22
    • summary: dns cache --> CURLOPTION_RESOLVE memory leak
     
  • Daniel Stenberg

    Daniel Stenberg - 2011-12-23

    Thanks for the report, this problem is now fixed in the git repository.

    To try it out, you either checkout/update your git clone: http://curl.haxx.se/source.html

    or you try tomorrow's daily snapshot: http://curl.haxx.se/snapshots/

     
  • Daniel Stenberg

    Daniel Stenberg - 2011-12-23
    • status: open --> closed-fixed