Unverified Commit 6fac5a3e authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

docs: mention NULL is fine input to several functions

Fixes #2837
Closes #2858
Reported-by: Markus Elfring
parent c817a3b6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -47,6 +47,9 @@ Any use of the \fBhandle\fP after this function has been called and have
returned, is illegal. \fIcurl_easy_cleanup(3)\fP kills the handle and all
memory associated with it!

Passing in a NULL pointer in \fIhandle\fP will make this function return
immediately with no action.
.SH "OLD TIMES"
For libcurl versions before 7.17,: after you've called this function, you can
safely remove all the strings you've previously told libcurl to use, as it
won't use them anymore now.
+4 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -40,6 +40,9 @@ the \fIcurl_formadd(3)\fP invoke(s).

\fBform\fP is the pointer as returned from a previous call to
\fIcurl_formadd(3)\fP and may be NULL.

Passing in a NULL pointer in \fIform\fP will make this function return
immediately with no action.
.SH AVAILABILITY
Deprecated in 7.56.0.
.SH RETURN VALUE
+4 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -31,5 +31,8 @@ curl_free - reclaim memory that has been obtained through a libcurl call
curl_free reclaims memory that has been obtained through a libcurl call.  Use
\fIcurl_free(3)\fP 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 \fIptr\fP will make this function return
immediately with no action.
.SH "SEE ALSO"
.BR curl_easy_unescape "(3), " curl_easy_escape "(3) "
+3 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -40,6 +40,8 @@ not be explicitly freed as they are by the top structure freeing.
\fBmime\fP is the handle as returned from a previous call to
\fIcurl_mime_init(3)\fP and may be NULL.

Passing in a NULL pointer in \fImime\fP will make this function return
immediately with no action.
.SH AVAILABILITY
As long as at least one of HTTP, SMTP or IMAP is enabled. Added in 7.56.0.
.SH RETURN VALUE
+4 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
.\" *                            | (__| |_| |  _ <| |___
.\" *                             \___|\___/|_| \_\_____|
.\" *
.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" * Copyright (C) 1998 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
.\" *
.\" * This software is licensed as described in the file COPYING, which
.\" * you should have received as part of this distribution. The terms
@@ -40,6 +40,9 @@ handle is no longer connected to the multi handle

3 - \fIcurl_multi_cleanup(3)\fP should be called when all easy handles are
removed

Passing in a NULL pointer in \fImulti_handle\fP will make this function return
CURLM_BAD_HANDLE immediately with no other action.
.SH RETURN VALUE
CURLMcode type, general libcurl multi interface error code. On success,
CURLM_OK is returned.
Loading