From: Daniel Stenberg Date: Fri, 24 Oct 2003 12:57:23 +0000 (+0000) Subject: better bailing-out cleanup if a malloc fails in the DNS cache X-Git-Tag: curl-7_10_8~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=017a78d0c50e2e049c2111065e9c5d4e1e49e533;p=thirdparty%2Fcurl.git better bailing-out cleanup if a malloc fails in the DNS cache --- diff --git a/lib/hostip.c b/lib/hostip.c index c06961e790..21227567e2 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -344,6 +344,11 @@ int Curl_resolv(struct connectdata *conn, if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); + + if(!dns) { + /* returned failure, bail out nicely */ + Curl_freeaddrinfo(addr); + } } }