diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-08-03 12:33:00 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-08-03 12:33:00 +0200 |
commit | 964263bb8d650f1681665c55704fb01a8e725621 (patch) | |
tree | dd0f1ace0ca1ca539b96167bae918c38d3a5742b /sysdeps | |
parent | 1f22702ea29f93d6e8acc835317363c22134ba6f (diff) | |
download | glibc-964263bb8d650f1681665c55704fb01a8e725621.zip glibc-964263bb8d650f1681665c55704fb01a8e725621.tar.gz glibc-964263bb8d650f1681665c55704fb01a8e725621.tar.bz2 |
getaddrinfo: Release resolver context on error in gethosts [BZ #21885]
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index efa7118..699411c 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -255,6 +255,8 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req, break; \ if (!scratch_buffer_grow (tmpbuf)) \ { \ + __resolv_context_enable_inet6 (res_ctx, res_enable_inet6); \ + __resolv_context_put (res_ctx); \ result = -EAI_MEMORY; \ goto free_and_return; \ } \ |