cURL / Mailing Lists / curl-library / Single Mail

curl-library

Freeing CURLFORM_BUFFERPTR

From: David Siebörger <d.sieborger_at_ru.ac.za>
Date: Sat, 02 Aug 2014 22:13:20 +0300

Hi,

curl_formadd(3) says that the buffer provided with CURLFORM_BUFFERPTR "must
not be freed until after curl_easy_cleanup(3) is called." Is that correct?

I'd imagine that once the request has been completed and curl_formfree has
been called, curl would've lost the pointer to the buffer and it'd be safe to
free it, or at least that curl wouldn't have any reason to look back at what
it had uploaded previously.

My application needs to submit a file via HTTPS once a minute, so I'd prefer
not to have curl_easy_cleanup tear the connection down every time just so that
the buffer can be freed.

Thanks,

-- 
David Siebörger
Information & Technology Services, Rhodes University
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-02