]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
easy/transfer: fix cookie-disabled build
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 Jun 2022 13:45:27 +0000 (15:45 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 Jun 2022 20:54:12 +0000 (22:54 +0200)
Follow-up from 45de940cebf6a
Reported-by: Marcel Raad
Fixes #8953
Closes #8954

lib/easy.c
lib/transfer.c

index bd9d695bb5ad3ab889971793e35acd79c6324d0b..336cada8784840a8c86d9c4ce285893abf1f1e2c 100644 (file)
@@ -838,6 +838,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
   outcurl->progress.flags    = data->progress.flags;
   outcurl->progress.callback = data->progress.callback;
 
+#ifndef CURL_DISABLE_COOKIES
   if(data->cookies) {
     /* If cookies are enabled in the parent handle, we enable them
        in the clone as well! */
@@ -856,6 +857,7 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
     if(!outcurl->state.cookielist)
       goto fail;
   }
+#endif
 
   if(data->state.url) {
     outcurl->state.url = strdup(data->state.url);
@@ -937,8 +939,10 @@ struct Curl_easy *curl_easy_duphandle(struct Curl_easy *data)
   fail:
 
   if(outcurl) {
+#ifndef CURL_DISABLE_COOKIES
     curl_slist_free_all(outcurl->state.cookielist);
     outcurl->state.cookielist = NULL;
+#endif
     Curl_safefree(outcurl->state.buffer);
     Curl_dyn_free(&outcurl->state.headerb);
     Curl_safefree(outcurl->state.url);
index 27eec8a46b631a56f62e0e4a2fb38be9cb4575cd..01f764ac50cf93a3acce249e24149e7f8c7389d5 100644 (file)
@@ -1422,10 +1422,11 @@ CURLcode Curl_pretransfer(struct Curl_easy *data)
   else
     data->state.infilesize = 0;
 
+#ifndef CURL_DISABLE_COOKIES
   /* If there is a list of cookie files to read, do it now! */
   if(data->state.cookielist)
     Curl_cookie_loadfiles(data);
-
+#endif
   /* If there is a list of host pairs to deal with */
   if(data->state.resolve)
     result = Curl_loadhostpairs(data);