about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--resolv/res_init.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b6ee82386..a38c643f41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-15  Andreas Schwab  <schwab@suse.de>
+
+	[BZ #19257]
+	* resolv/res_init.c (__res_iclose): Use statp->nscount instead of
+	statp->_u._ext.nscount as loop count.
+
 2016-03-14  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* math/test-signgam-finite-c99.c: Also #undef
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 128004afb8..02590fb1fd 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -580,7 +580,7 @@ __res_iclose(res_state statp, bool free_addr) {
 		statp->_vcsock = -1;
 		statp->_flags &= ~(RES_F_VC | RES_F_CONN);
 	}
-	for (ns = 0; ns < statp->_u._ext.nscount; ns++)
+	for (ns = 0; ns < statp->nscount; ns++)
 		if (statp->_u._ext.nsaddrs[ns]) {
 			if (statp->_u._ext.nssocks[ns] != -1) {
 				close_not_cancel_no_status(statp->_u._ext.nssocks[ns]);