mirror of
https://github.com/curl/curl.git
synced 2026-08-26 04:13:31 +03:00
urldata: move hstslist from 'set' to 'state'
To make it work properly with curl_easy_duphandle(). This, because duphandle duplicates the entire 'UserDefined' struct by plain copy while 'hstslist' is a linked curl_list of file names. This would lead to a double-free when the second of the two involved easy handles were closed. Closes #12315
This commit is contained in:
parent
7cb03229d9
commit
289b486ffa
4 changed files with 10 additions and 11 deletions
|
|
@ -412,7 +412,7 @@ CURLcode Curl_close(struct Curl_easy **datap)
|
|||
#ifndef CURL_DISABLE_HSTS
|
||||
if(!data->share || !data->share->hsts)
|
||||
Curl_hsts_cleanup(&data->hsts);
|
||||
curl_slist_free_all(data->set.hstslist); /* clean up list */
|
||||
curl_slist_free_all(data->state.hstslist); /* clean up list */
|
||||
#endif
|
||||
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
|
||||
Curl_http_auth_cleanup_digest(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue