cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl segfaults on file transfer

From: Ryan <rcdetert_at_ucdavis.edu>
Date: Mon, 16 Aug 2004 00:39:40 -0700

I have them initialized to NULL.

These are the three lines that are above the code i last posted:

struct curl_httppost* post = NULL;
struct curl_httppost* last = NULL;
CURL *hCURL;

am I still missing something?

-ryan

On Mon, 2004-08-16 at 00:31, Daniel Stenberg wrote:
> 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
Received on 2004-08-16