From: Daniel Stenberg Date: Sun, 12 Sep 2021 21:22:47 +0000 (+0200) Subject: Curl_hsts_loadcb: don't attempt to load if hsts wasn't inited X-Git-Tag: curl-7_79_0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8822ecf7a18c6977ac09b707ff720e503e81bfaf;p=thirdparty%2Fcurl.git Curl_hsts_loadcb: don't attempt to load if hsts wasn't inited Reported-by: Jonathan Cardoso Fixes #7710 Closes #7711 --- diff --git a/lib/hsts.c b/lib/hsts.c index 0d5a584012..853c7dfea5 100644 --- a/lib/hsts.c +++ b/lib/hsts.c @@ -526,7 +526,9 @@ CURLcode Curl_hsts_loadfile(struct Curl_easy *data, */ CURLcode Curl_hsts_loadcb(struct Curl_easy *data, struct hsts *h) { - return hsts_pull(data, h); + if(h) + return hsts_pull(data, h); + return CURLE_OK; } #endif /* CURL_DISABLE_HTTP || CURL_DISABLE_HSTS */