mirror of https://github.com/moparisthebest/curl
better bailing-out cleanup if a malloc fails in the DNS cache
This commit is contained in:
parent
9010bd3831
commit
017a78d0c5
|
@ -344,6 +344,11 @@ int Curl_resolv(struct connectdata *conn,
|
||||||
|
|
||||||
if(data->share)
|
if(data->share)
|
||||||
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
||||||
|
|
||||||
|
if(!dns) {
|
||||||
|
/* returned failure, bail out nicely */
|
||||||
|
Curl_freeaddrinfo(addr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue