1curl_mime_free(3)                   libcurl                  curl_mime_free(3)
2
3
4

NAME

6       curl_mime_free - free a previously built mime structure
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       void curl_mime_free(curl_mime *mime);
12

DESCRIPTION

14       curl_mime_free(3)  is  used  to clean up data previously built/appended
15       with curl_mime_addpart(3) and other mime-handling functions. This  must
16       be  called  when  the  data  has been used, which typically means after
17       curl_easy_perform(3) has been called.
18
19       The handle to free is the one you passed to the CURLOPT_MIMEPOST(3) op‐
20       tion: attached sub part mime structures must not be explicitly freed as
21       they are by the top structure freeing.
22
23       mime  is  the  handle   as   returned   from   a   previous   call   to
24       curl_mime_init(3) and may be NULL.
25
26       Passing  in a NULL pointer in mime will make this function return imme‐
27       diately with no action.
28

EXAMPLE

30         /* Build the mime message. */
31         mime = curl_mime_init(curl);
32
33         /* ... */
34
35         /* Free multipart message. */
36         curl_mime_free(mime);
37

AVAILABILITY

39       As long as at least one of HTTP, SMTP or  IMAP  is  enabled.  Added  in
40       7.56.0.
41

RETURN VALUE

43       None
44

SEE ALSO

46       curl_mime_init(3)
47
48
49
50libcurl 8.2.1                   April 26, 2023               curl_mime_free(3)
Impressum