curl-library
Cancelling a callback function
Date: Sun, 27 Feb 2011 23:23:09 -0500
Hi everyone. I'm a newbie trying to learn C99 and write a Wikipedia
bot in C.
My code does the following things:
buffer = malloc (buffersize) ;
curl_easy_setopt ( curlhandle, CURLOPT_WRITEFUNCTION,
Writememorycallback ) ;
curl_easy_setopt ( curlhandle, CURLOPT_WRITEDATA, &chunk ) ;
curl_easy_perform ();
free(buffer);
Now, I'm anxious about the possibility that Writememorycallback is
going to be called after the free() has released the memory that it's
writing into. Do I need to 'cancel' the callback function to be sure?
Richard
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-02-28