about summary refs log tree commit diff
path: root/sysdeps/posix/getaddrinfo.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-05-10 10:09:24 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-05-10 10:09:24 +0200
commit8db2cf163e048b02cbafe118bf033b78618c2f30 (patch)
treeef6e9bcea5bf0334f212204ca2278f06b965016f /sysdeps/posix/getaddrinfo.c
parent9e6e128d145157844cf446962a640eacafc54a01 (diff)
downloadglibc-8db2cf163e048b02cbafe118bf033b78618c2f30.tar.gz
glibc-8db2cf163e048b02cbafe118bf033b78618c2f30.tar.xz
glibc-8db2cf163e048b02cbafe118bf033b78618c2f30.zip
getaddrinfo: Restore RES_USE_INET6 flag on error path [BZ #19994]
Diffstat (limited to 'sysdeps/posix/getaddrinfo.c')
-rw-r--r--sysdeps/posix/getaddrinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index fed2d3bf13..c670a984b2 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;					      \
 	  }								      \