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 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
Copy link
Member

@bagder bagder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@jay
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
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
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
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 fix_curl_getenv_description branch March 2, 2020 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants