cURL / Mailing Lists / curl-library / Single Mail


Cancelling a callback function

From: <>
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 ();


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?


List admin:
Received on 2011-02-28