url: fix build with --disable-cookies

Struct `UserDefined` has no member `cookielist` if
`CURL_DISABLE_COOKIES` is defined.

Follow-up to af5999a

Closes #10158
This commit is contained in:
Hannah Schierling 2022-12-25 23:45:01 +01:00 committed by Daniel Stenberg
parent 4ab601d93a
commit a5cf4a87cf
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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]);