diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-09-12 23:22:47 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-09-12 23:43:51 +0200 |
commit | 8822ecf7a18c6977ac09b707ff720e503e81bfaf (patch) | |
tree | e5dd81fd2a02ffb64e0cf84200840bac67fb01d3 | |
parent | 24a7cbe9d22cb1783a33b94288b656191b0e4375 (diff) | |
download | curl-8822ecf7a18c6977ac09b707ff720e503e81bfaf.tar.gz |
Curl_hsts_loadcb: don't attempt to load if hsts wasn't inited
Reported-by: Jonathan Cardoso
Fixes #7710
Closes #7711
-rw-r--r-- | lib/hsts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hsts.c b/lib/hsts.c index 0d5a58401..853c7dfea 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 */ |