]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: fix build with `--disable-cookies`
authorHannah Schierling <hannahreturns@googlemail.com>
Sun, 25 Dec 2022 22:45:01 +0000 (23:45 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 26 Dec 2022 08:27:39 +0000 (09:27 +0100)
Struct `UserDefined` has no member `cookielist` if
`CURL_DISABLE_COOKIES` is defined.

Follow-up to af5999a

Closes #10158

lib/url.c

index 058301b1e7c393d1b751dfc00acd82564c9be1db..6a18022bd076969b373fb2a88516032f6308b638 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -431,7 +431,9 @@ CURLcode Curl_close(struct Curl_easy **datap)
   Curl_dyn_free(&data->state.headerb);
   Curl_safefree(data->state.ulbuf);
   Curl_flush_cookies(data, TRUE);
+#ifndef CURL_DISABLE_COOKIES
   curl_slist_free_all(data->set.cookielist); /* clean up list */
+#endif
   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]);