urldata: move the cookefilelist to the 'set' struct

The cookiefile entries are set into the handle and should remain set for
the lifetime of the handle so that duplicating it also duplicates the
list. Therefore, the struct field is moved from 'state' to 'set'.

Fixes #10133
Closes #10134
This commit is contained in:
Daniel Stenberg 2022-12-22 13:09:16 +01:00
parent e4505a1915
commit af5999a674
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
7 changed files with 24 additions and 37 deletions

View file

@ -431,6 +431,7 @@ CURLcode Curl_close(struct Curl_easy **datap)
Curl_dyn_free(&data->state.headerb);
Curl_safefree(data->state.ulbuf);
Curl_flush_cookies(data, TRUE);
curl_slist_free_all(data->set.cookielist); /* clean up list */
Curl_altsvc_save(data, data->asi, data->set.str[STRING_ALTSVC]);
Curl_altsvc_cleanup(&data->asi);
Curl_hsts_save(data, data->hsts, data->set.str[STRING_HSTS]);