On Fri, 23 Mar 2012, Andrea Narciso wrote:

I'm using libcurl to implement an FTP client. I hooked a custom debug handler to the library using CURLOPT_DEBUGFUNCTION as follows:

curl_easy_setopt(m_CurlHandle, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(m_CurlHandle, CURLOPT_DEBUGFUNCTION, MyDebugHandler);
curl_easy_setopt(m_CurlHandle, CURLOPT_DEBUGDATA, &myData);

During normal operations (file transfer, navigation etc.) this is working fine.

When I shut down the connection using curl_easy_cleanup(), MyDebugHandler() gets called with an invalid pointer to myData, so my application crashes when it tries to use it.

Is this a bug or am I doing something wrong?

Hi, and thanks a lot for reporting this problem!

Any chance you can write up an example source code for us that we can use to repeat this problem and see if it is a bug and if so, what we can do about it to make it go away?

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to