Skip to content

add memory management information for curl_url_set#6953

Closed
Johann150 wants to merge 1 commit intocurl:masterfrom
Johann150:master
Closed

add memory management information for curl_url_set#6953
Johann150 wants to merge 1 commit intocurl:masterfrom
Johann150:master

Conversation

@Johann150
Copy link
Contributor

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 closed this in 68f6c56 Apr 25, 2021
@bagder
Copy link
Member

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

Development

Successfully merging this pull request may close these issues.

2 participants