mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
hostip.c: fix Curl_loadhostpairs() OOM handling
This commit is contained in:
parent
63e2718f8d
commit
8e25d1b93b
@ -782,8 +782,10 @@ CURLcode Curl_loadhostpairs(struct SessionHandle *data)
|
|||||||
/* Create an entry id, based upon the hostname and port */
|
/* Create an entry id, based upon the hostname and port */
|
||||||
entry_id = create_hostcache_id(hostname, port);
|
entry_id = create_hostcache_id(hostname, port);
|
||||||
/* If we can't create the entry id, fail */
|
/* If we can't create the entry id, fail */
|
||||||
if(!entry_id)
|
if(!entry_id) {
|
||||||
|
Curl_freeaddrinfo(addr);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
entry_len = strlen(entry_id);
|
entry_len = strlen(entry_id);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user