cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl segfaults on file transfer

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 16 Aug 2004 09:31:59 +0200 (CEST)

On Mon, 16 Aug 2004, Ryan wrote:

> does anyone know why the file upload is giving problems when I try to
> delete?

Your snippet lacks some of the basic stuff that the curl_formadd() man page
describes[1]:

   The pointers *firstitem and *lastitem should both be pointing to NULL in the
   first call to this function. All list-data will be allocated by the function
   itself. You must call curl_formfree after the form post has been done to
   free the resources again.

Failing to comply to these rules may render unexpected results.

[1] = http://curl.haxx.se/libcurl/c/curl_formadd.html

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-16