curl-library
Re: curl_slist_free_all Issue
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 1 Dec 2006 17:01:58 +0100 (CET)
Date: Fri, 1 Dec 2006 17:01:58 +0100 (CET)
On Fri, 1 Dec 2006, Laurent Taurines wrote:
> It seems I was right. After calling curl_slist_free_all(slist) slist must be
> set to NULL otherwise it does not work as expected.
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.
> I do not know if this should be considered as a bug but it seems to me that
> curl_slist_free_all(slist) should set slist to NULL.
No, it can't and it shouldn't.
I rather suspect your problem is that you haven't initialized the pointer to
NULL when you call curl_slist_append() the first time.
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2006-12-01