possible memory leak in CURL code
#1
I am trying to get my head around the code base, and I started by running Valgrind on R34478. I picked out some of the larger memory leaks to go after, and found one in the CURL code. Specifically in the file DllLibCurl.cpp, there are calls to the libcurl function curl_multi_init() which do not have matching calls to curl_multi_cleanup(). This causes a memory leak.
You will notice that curl_multi_cleanup() is only called when a session goes idle (CheckIdle() method). That means all non-idle sessions are left open when xbmc exits, leaking memory to the OS.
Anyone familiar with the code in question, particularly DllLibCurl.cpp and FileCurl.cpp that can help me figure out a fix? I added code to the destructor to release the memory, which works - but might not be the best solution.
Reply
#2
An apps virtual memory is always re-claimed by the OS when the app quits so it not that much of a problem but still, memory leaks should be addressed. Best way is to create a trac ticket with details and attached a patch. That way, it does not get lost in the forum churn.
Reply

Logout Mark Read Team Forum Stats Members Help
possible memory leak in CURL code0