cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: postit2.c and postit.c errors

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 8 Oct 2001 13:32:30 +0200 (MET DST)

On Fri, 5 Oct 2001, David Wimsey wrote:

[CC'ed to the libcurl mailing list, as this is clearly a libcurl related
issue]

> Under win32, the source examples provided in postit2.c and postit.c have
> some slight problems, namely the order in which curl_easy_cleanup() is
> called. Its called before the calls to curl_formfree() and
> curl_slist_freeall() which for me, causes an exception, as the memory
> being freed by curl_formfree() is already free'd by curl_easy_cleanup...
> might wanna change that order slightly.

I can't understand why this would make a difference, and since you claim it
does, it indicates a problem somewhere that needs attention rather than a
work-around.

The curl_formfree() call is meant to free only the linked list of form-data
that is created with curl_formadd() or curl_formparse(). It shouldn't matter
in which order you free that information, in regard to when
curl_easy_cleanup() is called.

Are you capable of digging up more details on where exactly it causes the
exception?

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-10-08