cURL / Mailing Lists / curl-library / Single Mail


Re: Memory leak when using curl_easy_perform with Curl 7.6.1 library

From: Daniel Stenberg <>
Date: Wed, 26 Sep 2001 18:34:18 +0200 (MET DST)

On Wed, 26 Sep 2001, Bescon, Guenole wrote:

> I encountered a memory leak during my endurance tests
> The leak seems to be in the curl_easy_perform function

First I must of course agree with Linus. So much has happened since 7.6.1
that you will get a hard time to get me to go hunting bugs there.

Upgrading or not, to find out where the assumed leak is, I would suggest that

1. recompile libcurl with MALLOCDEBUG defined (make sure all libcurl files
   are rebuilt)
2. add a function call to curl_memdebug(filename) before _any_ use of libcurl
3. after having done numerous tests you'll have a huge file in the specified
   file name
4. get the perl script from the curl CVS and pass that
   memory dump file as input.
5. read the output, it identifies memory/file handle/socket leaks in libcurl

6. If you didn't upgrade, do that and then go back to 1. :-) If you did
   upgrade, post's output to this mailing list!

    Daniel Stenberg -- curl groks URLs --
Received on 2001-09-26