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

add memory management information for curl_url_set #6953

Closed
wants to merge 1 commit into from

Conversation

@Johann150
Copy link
Contributor

@Johann150 Johann150 commented Apr 24, 2021

It would be nice to know how to manage the memory of a newly set URL (part) from the documentation. From reading the respective source file lib/urlapi.c, I gather that the changes represent that accurately: The string that ends up being written to the URL struct is either malloc'ed before either due to encoding or appending a query, or it is strdup'ed.

I made the wording similar to the man page for CURLOPT_URL:

The application does not have to keep the string around after setting this
option.

@bagder
bagder approved these changes Apr 25, 2021
@bagder bagder closed this in 68f6c56 Apr 25, 2021
@bagder
Copy link
Member

@bagder bagder commented Apr 25, 2021

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants