This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH COMMITTED] getaddrinfo: Restore RES_USE_INET6 flag on error path [BZ #19994]
- From: fweimer at redhat dot com (Florian Weimer)
- To: libc-alpha at sourceware dot org
- Date: Tue, 10 May 2016 10:23:24 +0200
- Subject: [PATCH COMMITTED] getaddrinfo: Restore RES_USE_INET6 flag on error path [BZ #19994]
- Authentication-results: sourceware.org; auth=none
2016-05-10 Florian Weimer <fweimer@redhat.com>
[BZ #19994]
* sysdeps/posix/getaddrinfo.c (gethosts): Restore RES_USE_INET6
flag in _res.options.
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index fed2d3b..c670a98 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -240,6 +240,7 @@ convert_hostent_to_gaih_addrtuple (const struct addrinfo *req,
2 * tmpbuflen); \
if (newp == NULL) \
{ \
+ _res.options |= old_res_options & RES_USE_INET6; \
result = -EAI_MEMORY; \
goto free_and_return; \
} \