diff options
author | Daniel Stenberg <daniel@haxx.se> | 2003-10-24 12:57:23 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2003-10-24 12:57:23 +0000 |
commit | 017a78d0c50e2e049c2111065e9c5d4e1e49e533 (patch) | |
tree | 9058e50c275edac71776721c26023d9960f7cf5b | |
parent | 9010bd3831adffe1c468275f6c627a0e0ce2bd72 (diff) |
better bailing-out cleanup if a malloc fails in the DNS cache
-rw-r--r-- | lib/hostip.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index c06961e79..21227567e 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); + } } } |