[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 215/282: curl_getenv.3: Fix the memory handling description
From: |
gnunet |
Subject: |
[gnurl] 215/282: curl_getenv.3: Fix the memory handling description |
Date: |
Wed, 01 Apr 2020 14:31:20 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 1722eb83b4adf879426908bc6006f869ca224564
Author: Jay Satiro <address@hidden>
AuthorDate: Mon Mar 2 02:59:40 2020 -0500
curl_getenv.3: Fix the memory handling description
- Tell the user to call curl_free() to free the pointer returned by
curl_getenv().
Prior to this change the user was directed to call free(), but that
would not work in cases where the library and application use separate C
runtimes and therefore have separate heap memory management.
Closes https://github.com/curl/curl/pull/5016
---
docs/libcurl/curl_getenv.3 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/libcurl/curl_getenv.3 b/docs/libcurl/curl_getenv.3
index c6bee98db..b6cc623ba 100644
--- a/docs/libcurl/curl_getenv.3
+++ b/docs/libcurl/curl_getenv.3
@@ -31,15 +31,15 @@ curl_getenv - return value for environment name
curl_getenv() is a portable wrapper for the getenv() function, meant to
emulate its behaviour and provide an identical interface for all operating
systems libcurl builds on (including win32).
+
+You must \fIcurl_free(3)\fP the returned string when you're done with it.
.SH AVAILABILITY
This function will be removed from the public libcurl API in a near future. It
will instead be made "available" by source code access only, and then as
curlx_getenv().
.SH RETURN VALUE
-If successful, curl_getenv() returns a pointer to the value of the specified
-environment. The memory it refers to is malloc()ed so the application must
-free() this when the data is no longer needed. When \fIcurl_getenv(3)\fP fails
-to find the specified name, it returns a null pointer.
+A pointer to a zero terminated string or NULL if it failed to find the
+specified name.
.SH NOTE
Under unix operating systems, there isn't any point in returning an allocated
memory, although other systems won't work properly if this isn't done. The
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 216/282: curl_escape.3: Add a link to curl_free, (continued)
- [gnurl] 216/282: curl_escape.3: Add a link to curl_free, gnunet, 2020/04/01
- [gnurl] 219/282: sha256: Added mbedtls implementation, gnunet, 2020/04/01
- [gnurl] 225/282: Revert "sha256: Added SecureTransport implementation", gnunet, 2020/04/01
- [gnurl] 209/282: ci/tests: fine-tune Azure Pipeline timeouts with a small puffer, gnunet, 2020/04/01
- [gnurl] 214/282: md4: use init/update/final functions in Secure Transport, gnunet, 2020/04/01
- [gnurl] 220/282: sha256: Added SecureTransport implementation, gnunet, 2020/04/01
- [gnurl] 224/282: dist: include tests/azure.pm in the tarball, gnunet, 2020/04/01
- [gnurl] 217/282: sha256: Added GNU TLS Nettle implementation, gnunet, 2020/04/01
- [gnurl] 200/282: mime: do not perform more than one read in a row, gnunet, 2020/04/01
- [gnurl] 218/282: sha256: Added GNU TLS gcrypt implementation, gnunet, 2020/04/01
- [gnurl] 215/282: curl_getenv.3: Fix the memory handling description,
gnunet <=
- [gnurl] 211/282: http: mark POSTs with no body as "upload done" from the start, gnunet, 2020/04/01
- [gnurl] 212/282: multi_wait: stop loop when sread() returns zero, gnunet, 2020/04/01
- [gnurl] 227/282: ci/tests: Move CI test result creation above environment setup, gnunet, 2020/04/01
- [gnurl] 228/282: README.md: add Azure DevOps Pipelines build status badge, gnunet, 2020/04/01
- [gnurl] 230/282: cmake: Show HTTPS-proxy in the features output, gnunet, 2020/04/01
- [gnurl] 226/282: ci/tests: Send test results to AppVeyor for status overview, gnunet, 2020/04/01
- [gnurl] 231/282: ci/tests: fix escaping of testnames and disable proxy for CI APIs, gnunet, 2020/04/01
- [gnurl] 237/282: tests: align some Windows sleep defines with each other, gnunet, 2020/04/01
- [gnurl] 236/282: tests: try to make sleeping portable by avoiding select, gnunet, 2020/04/01
- [gnurl] 233/282: RELEASE-NOTES: 7.69.0, gnunet, 2020/04/01