diff options
| author | Yang Tse <yangsita@gmail.com> | 2012-01-02 13:41:09 +0100 | 
|---|---|---|
| committer | Yang Tse <yangsita@gmail.com> | 2012-01-02 13:41:09 +0100 | 
| commit | 8e25d1b93b590afb923f033810ae52fe88db3b16 (patch) | |
| tree | 1f57a9db4276c6b8e27271db4629c311685e0d70 | |
| parent | 63e2718f8d0f52a4a53db0fdd3822dde12d2ad42 (diff) | |
hostip.c: fix Curl_loadhostpairs() OOM handling
| -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);  | 
