mirror of
https://github.com/curl/curl.git
synced 2026-06-18 22:05:37 +03:00
better bailing-out cleanup if a malloc fails in the DNS cache
This commit is contained in:
parent
9010bd3831
commit
017a78d0c5
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue