Curl_resolv: explicitly set *entry to NULL at the top

Closes #19263
This commit is contained in:
x2018 2025-10-28 13:16:36 +08:00 committed by Daniel Stenberg
parent bc99770217
commit 02113a6307
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

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