better bailing-out cleanup if a malloc fails in the DNS cache

This commit is contained in:
Daniel Stenberg 2003-10-24 12:57:23 +00:00
parent 9010bd3831
commit 017a78d0c5
1 changed files with 5 additions and 0 deletions

View File

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