diff options
Diffstat (limited to 'lib/hostip.c')
-rw-r--r-- | lib/hostip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 0d737f406..828d27e42 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -782,8 +782,10 @@ CURLcode Curl_loadhostpairs(struct SessionHandle *data) /* Create an entry id, based upon the hostname and port */ entry_id = create_hostcache_id(hostname, port); /* If we can't create the entry id, fail */ - if(!entry_id) + if(!entry_id) { + Curl_freeaddrinfo(addr); return CURLE_OUT_OF_MEMORY; + } entry_len = strlen(entry_id); |