diff options
author | Florian Weimer <fweimer@redhat.com> | 2017-08-03 13:59:17 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2017-08-03 13:59:17 +0200 |
commit | dc258ce62ae0bbb456c6a855dbb6b384ecf7e988 (patch) | |
tree | 089fdd9b9abcbed5463e7167154d8657e201c42c | |
parent | 1c9a5c270d8b66f30dcfaf1cb2d6cf39d3e18369 (diff) | |
download | glibc-dc258ce62ae0bbb456c6a855dbb6b384ecf7e988.zip glibc-dc258ce62ae0bbb456c6a855dbb6b384ecf7e988.tar.gz glibc-dc258ce62ae0bbb456c6a855dbb6b384ecf7e988.tar.bz2 |
getaddrinfo: Release resolver context on error in gethosts [BZ #21885]
(cherry picked from commit 964263bb8d650f1681665c55704fb01a8e725621)
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | NEWS | 6 | ||||
-rw-r--r-- | sysdeps/posix/getaddrinfo.c | 2 |
3 files changed, 14 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2017-08-03 Florian Weimer <fweimer@redhat.com> + + [BZ #21885] + * sysdeps/posix/getaddrinfo.c (gethosts): Release resolver context + on memory allocation failure. + 2017-08-02 Siddhesh Poyarekar <siddhesh@sourceware.org> * version.h (RELEASE): Set to "stable" @@ -5,6 +5,12 @@ See the end for copying conditions. Please send GNU C library bug reports via <http://sourceware.org/bugzilla/> using `glibc' in the "product" field. +Version 2.26.1 + +The following bugs are resolved with this release: + + [21885] getaddrinfo: Release resolver context on error in gethosts + Version 2.26 Major new features: 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; \ } \ |