Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl_getenv.3: Fix the memory handling description #5016

Closed
wants to merge 1 commit into from

Conversation

@jay
Copy link
Member

jay commented Mar 2, 2020

  • 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 #xxxx

- 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 #xxxx
@jay jay added the documentation label Mar 2, 2020
@bagder
bagder approved these changes Mar 2, 2020
Copy link
Member

bagder left a comment

Nice catch!

@jay

This comment has been minimized.

Copy link
Member Author

jay commented Mar 2, 2020

curl_escape and curl_unescape both use the same line but in the former case curl_free is not a link for some reason.

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Mar 2, 2020

It needs to be specified as \fIcurl_free(3)\fP to get linked, the former doesn't properly mark it so.

@jay

This comment has been minimized.

Copy link
Member Author

jay commented Mar 2, 2020

It needs to be specified as \fIcurl_free(3)\fP to get linked, the former doesn't properly mark it so.

They both already do that though, unless I'm missing the typo.

You must \fIcurl_free(3)\fP the returned string when you're done with it.

You must \fIcurl_free(3)\fP the returned string when you're done with it.

@bagder

This comment has been minimized.

Copy link
Member

bagder commented Mar 2, 2020

You looked at the wrong place:

You must curl_free() the returned string when you're done with it.

@jay jay closed this in 1722eb8 Mar 2, 2020
jay added a commit that referenced this pull request Mar 2, 2020
@jay jay deleted the jay:fix_curl_getenv_description branch Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.