curl_free - reclaim memory that has been obtained through a libcurl call
#include <curl/curl.h> void curl_free(char *ptr);
curl_free(3) libcurl Manual curl_free(3)
NAME
curl_free - reclaim memory that has been obtained through a libcurl
call
SYNOPSIS
#include <curl/curl.h>
void curl_free(char *ptr);
DESCRIPTION
curl_free reclaims memory that has been obtained through a libcurl
call. Use curl_free(3) instead of free() to avoid anomalies that can
result from differences in memory management between your application
and libcurl.
Passing in a NULL pointer in ptr will make this function return immedi-
ately with no action.
EXAMPLE
char *width = curl_getenv("COLUMNS");
if(width) {
/* it was set! */
curl_free(width);
}
AVAILABILITY
Always
RETURN VALUE
None
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
+---------------+------------------+
|ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+---------------+------------------+
|Availability | web/curl |
+---------------+------------------+
|Stability | Uncommitted |
+---------------+------------------+
SEE ALSO
curl_easy_unescape(3), curl_easy_escape(3)
NOTES
Source code for open source software components in Oracle Solaris can
be found at https://www.oracle.com/downloads/opensource/solaris-source-
code-downloads.html.
This software was built from source available at
https://github.com/oracle/solaris-userland. The original community
source was downloaded from https://curl.se/down-
load/curl-7.83.1.tar.bz2.
Further information about this software can be found on the open source
community website at http://curl.haxx.se/.
libcurl 7.83.1 November 26, 2021 curl_free(3)