I thought the curl_slist_append will append headers to freed list.
so it needs to points to NULL again if I want to reuse?

2017-05-05 19:56 GMT+08:00 Daniel Stenberg <[email protected]>:

> On Fri, 5 May 2017, Pahome Chen via curl-library wrote:
>
> *Error situation:*
>> *1st time:*
>> curl_slist_append(header, ...);
>> curl_easy_perform(curl);
>> curl_slist_free_all(header);
>>
>
> ... so here you free the list.
>
> *reuse next time:*
>> curl_slist_append(header, ...);
>>
>
> ... and now to try to reuse it again after it was freed?
>
> curl_easy_perform(curl); // get segfault
>>
>
> ... because you passed in an already freed list to libcurl?
>
> --
>
>  / daniel.haxx.se
>



-- 
Best Regards,
pahome
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to