cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_slist_free_all Issue

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 1 Dec 2006 20:04:44 +0100 (CET)

On Fri, 1 Dec 2006, Laurent Taurines wrote:

>> After you call that function, libcurl has nothing to do with it (== the
>> memory it pointed to) so you can do whatever you want with it.

> except that if we want to reuse slist we must set it to NULL after every call
> to curl_slist_free_all(slist) or before any call to curl_slist_append() (not
> only the first time).

Well, of course. When I said the first time I meant the first call to
curl_slist_append() as if you append multiple entries to the list you should
only NULLify it before the first.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-12-01