From: x2018 Date: Tue, 28 Oct 2025 05:16:36 +0000 (+0800) Subject: Curl_resolv: explicitly set *entry to NULL at the top X-Git-Tag: curl-8_17_0~81 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02113a6307a5f9ffcafd60604fba22b750942da5;p=thirdparty%2Fcurl.git Curl_resolv: explicitly set *entry to NULL at the top Closes #19263 --- diff --git a/lib/hostip.c b/lib/hostip.c index d4b1b87e7a..7e2551d8f3 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -848,6 +848,8 @@ CURLcode Curl_resolv(struct Curl_easy *data, size_t hostname_len; bool keep_negative = TRUE; /* cache a negative result */ + *entry = NULL; + #ifndef CURL_DISABLE_DOH data->conn->bits.doh = FALSE; /* default is not */ #else @@ -969,7 +971,6 @@ out: error: if(dns) Curl_resolv_unlink(data, &dns); - *entry = NULL; Curl_async_shutdown(data); if(keep_negative) store_negative_resolve(data, hostname, port);