aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Possible bug/memleak in code  (Read 2586 times)

Seagull

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 154
Possible bug/memleak in code
« 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."
« Last Edit: May 25, 2004, 12:43:09 PM by Seagull »
Logged

Seagull

  • Full Member
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 154
Re: Possible bug/memleak in code
« Reply #1 on: May 27, 2004, 01:57:54 AM »

Anyone can confirm? Am i missing something?
« Last Edit: May 27, 2004, 01:58:40 AM by Seagull »
Logged

deltaHF

  • Evil Admin
  • Former Developer
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 3920
  • .. Legends may sleep, but they never die ..
    • http://www.amule.org
Re: Possible bug/memleak in code
« Reply #2 on: May 27, 2004, 02:18:36 AM »

sorry, a lot to do atm :/

we will check it next days, no worries  :baby:

Jacobo221

  • Hero Member
  • *****
  • Karma: 3
  • Offline Offline
  • Posts: 2712
Re: Possible bug/memleak in code
« Reply #3 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.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Possible bug/memleak in code
« Reply #4 on: July 21, 2004, 09:52:24 PM »

*BUMP*

Fixed 2 months after ;) Sorry!
Logged