aMule Forum

English => en_Bugs => Topic started by: Seagull on May 25, 2004, 12:37:24 PM

Title: Possible bug/memleak in code
Post by: Seagull on May 25, 2004, 12:37:24 PM
Been looking at the amule code and the libcurl documentation at http://curl.netmirror.org/libcurl/ and found some possible problems:

in HTTPDownloadDlg.cpp - wxThread::ExitCode myThread::Entry()

1) curl_global_init(CURL_GLOBAL_ALL) is called every time a server.met download is requested, although the documentation says "This function should only be called once (no matter how many threads or libcurl sessions that'll be used) by every application that uses libcurl." It should be placed somewhere else, probably in some constructor.

2) curl_easy_cleanup isnt called after curl_easy_perform; this may lead to memleaks

3)  curl_global_cleanup isnt called anywhere;  this may lead to memleaks. In documentation:

"curl_global_cleanup must be called once (no matter how many threads or libcurl sessions that'll be used) by every application that uses libcurl, after all uses of libcurl is complete.

This is the opposite of curl_global_init(3).

Not calling this function may result in memory leaks."
Title: Re: Possible bug/memleak in code
Post by: Seagull on May 27, 2004, 01:57:54 AM
Anyone can confirm? Am i missing something?
Title: Re: Possible bug/memleak in code
Post by: deltaHF on May 27, 2004, 02:18:36 AM
sorry, a lot to do atm :/

we will check it next days, no worries  :baby:
Title: Re: Possible bug/memleak in code
Post by: Jacobo221 on May 27, 2004, 06:38:24 PM
Thanx, I'll add it to the bug list as a possible bug ;-)
Greetings and thanx again.
Title: Re: Possible bug/memleak in code
Post by: Kry on July 21, 2004, 09:52:24 PM
*BUMP*

Fixed 2 months after ;) Sorry!