summaryrefslogtreecommitdiff
path: root/lib/setopt.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-12-22 13:09:16 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-12-22 16:06:37 +0100
commitaf5999a6742ea90011e7fa08aade7eac9943b76a (patch)
tree4786ccad2f06062af09de06fea93199ebbf9337f /lib/setopt.c
parente4505a1915f1bfae71b06636f0690fae2c53c78e (diff)
downloadcurl-af5999a6742ea90011e7fa08aade7eac9943b76a.tar.gz
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
Diffstat (limited to 'lib/setopt.c')
-rw-r--r--lib/setopt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/setopt.c b/lib/setopt.c
index b77e95b4e..46b8a99f3 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -760,18 +760,18 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param)
return CURLE_BAD_FUNCTION_ARGUMENT;
/* append the cookie file name to the list of file names, and deal with
them later */
- cl = curl_slist_append(data->state.cookielist, argptr);
+ cl = curl_slist_append(data->set.cookielist, argptr);
if(!cl) {
- curl_slist_free_all(data->state.cookielist);
- data->state.cookielist = NULL;
+ curl_slist_free_all(data->set.cookielist);
+ data->set.cookielist = NULL;
return CURLE_OUT_OF_MEMORY;
}
- data->state.cookielist = cl; /* store the list for later use */
+ data->set.cookielist = cl; /* store the list for later use */
}
else {
/* clear the list of cookie files */
- curl_slist_free_all(data->state.cookielist);
- data->state.cookielist = NULL;
+ curl_slist_free_all(data->set.cookielist);
+ data->set.cookielist = NULL;
if(!data->share || !data->share->cookies) {
/* throw away all existing cookies if this isn't a shared cookie