From: Daniel Stenberg Date: Wed, 12 Nov 2025 10:59:25 +0000 (+0100) Subject: hostip: don't store negative lookup on OOM X-Git-Tag: rc-8_18_0-1~337 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a862920246b1b7b3852463eb5102dc85e070c95b;p=thirdparty%2Fcurl.git hostip: don't store negative lookup on OOM When convert_ipaddr_direct() returns error due to OOM, it must not be stored as a negative cache result. Closes #19484 --- diff --git a/lib/hostip.c b/lib/hostip.c index 7e2551d8f3..ff7ac18c99 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -904,8 +904,10 @@ CURLcode Curl_resolv(struct Curl_easy *data, #ifndef USE_RESOLVE_ON_IPS /* allowed to convert, hostname is IP address, then NULL means error */ - if(is_ipaddr) + if(is_ipaddr) { + keep_negative = FALSE; goto error; + } #endif /* Really need a resolver for hostname. */