Skip to content

Conversation

@Delta-in-hub
Copy link

The curl_slist used for setting HTTP headers was being allocated with curl_slist_append but was never deallocated. This resulted in a memory leak for every request made, as reported in issue #30.

I have added a call to curl_slist_free_all(headers) after the curl_easy_perform call.

@Delta-in-hub
Copy link
Author

https://curl.se/libcurl/c/curl_slist_free_all.html

Passing in a NULL pointer in list makes this function return immediately with no action.

@Delta-in-hub
Copy link
Author

Also improves URL handling of the base URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant