1curl_slist_free_all(3)          libcurl Manual          curl_slist_free_all(3)
2
3
4

NAME

6       curl_slist_free_all - free an entire curl_slist list
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       void curl_slist_free_all(struct curl_slist *list);
12

DESCRIPTION

14       curl_slist_free_all()   removes   all  traces  of  a  previously  built
15       curl_slist linked list.
16
17       Passing in a NULL pointer in list will make this function return  imme‐
18       diately with no action.
19

EXAMPLE

21       CURL *handle;
22       struct curl_slist *slist=NULL;
23
24       slist = curl_slist_append(slist, "X-libcurl: coolness");
25
26       if (slist == NULL)
27         return -1;
28
29       curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
30
31       curl_easy_perform(handle);
32
33       curl_slist_free_all(slist); /* free the list again */
34

AVAILABILITY

36       Always
37

RETURN VALUE

39       Nothing.
40

SEE ALSO

42       curl_slist_append(3),
43
44
45
46libcurl 7.82.0                 November 26, 2021        curl_slist_free_all(3)
Impressum