#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

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

     
    • milestone: --> bad_behaviour
     
    • summary: dns cache --> CURLOPTION_RESOLVE memory leak
     
    • status: open --> closed-fixed