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

NAME

6       curl_free  -  reclaim  memory  that has been obtained through a libcurl
7       call
8

SYNOPSIS

10       #include <curl/curl.h>
11
12       void curl_free(char *ptr);
13

DESCRIPTION

15       curl_free reclaims memory that has  been  obtained  through  a  libcurl
16       call.  Use  curl_free(3)  instead of free() to avoid anomalies that can
17       result from differences in memory management between  your  application
18       and libcurl.
19
20       Passing in a NULL pointer in ptr will make this function return immedi‐
21       ately with no action.
22

EXAMPLE

24         char *width = curl_getenv("COLUMNS");
25         if(width) {
26           /* it was set! */
27           curl_free(width);
28         }
29

AVAILABILITY

31       Always
32

RETURN VALUE

34       None
35

SEE ALSO

37       curl_easy_unescape(3), curl_easy_escape(3)
38
39
40
41libcurl 7.85.0                   May 17, 2022                     curl_free(3)
Impressum