[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[glibc] 01/01: debian/patches/any/cvs-resolver-leak.diff: Backport upstream patch by Andreas Schwab to fix a memory leak in the resolver (Closes: #818178)



This is an automated email from the git hooks/post-receive script.

adconrad pushed a commit to branch glibc-2.23
in repository glibc.

commit 27c8da325b5a86da4f0221c2335ec7a573fc8f5a
Author: Adam Conrad <adconrad@0c3.net>
Date:   Thu Mar 17 15:50:15 2016 -0600

    debian/patches/any/cvs-resolver-leak.diff: Backport upstream patch by Andreas Schwab to fix a memory leak in the resolver (Closes: #818178)
---
 debian/changelog                          |  2 ++
 debian/patches/any/cvs-resolver-leak.diff | 29 +++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 32 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 6a816e4..460eabf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,8 @@ glibc (2.23-0experimental1) UNRELEASED; urgency=medium
   [ Adam Conrad ]
   * debian/patches/any/cvs-tst-malloc-thread-exit.diff: Backport fix from
     upstream to make tst-malloc-thread-exit use fewer system resources.
+  * debian/patches/any/cvs-resolver-leak.diff: Backport upstream patch by
+    Andreas Schwab to fix a memory leak in the resolver (Closes: #818178)
   * debian/control.in/i386: Remove list of Breaks that predate oldstable.
 
  -- Aurelien Jarno <aurel32@debian.org>  Mon, 14 Mar 2016 00:14:11 +0100
diff --git a/debian/patches/any/cvs-resolver-leak.diff b/debian/patches/any/cvs-resolver-leak.diff
new file mode 100644
index 0000000..4a2ee6d
--- /dev/null
+++ b/debian/patches/any/cvs-resolver-leak.diff
@@ -0,0 +1,29 @@
+commit 5e7fdabd7df1fc6c56d104e61390bf5a6b526c38
+Author: Andreas Schwab <schwab@suse.de>
+Date:   Wed Nov 18 15:45:59 2015 +0100
+
+    Fix resource leak in resolver (bug 19257)
+    
+    The number of currently defined nameservers is stored in ->nscount,
+    whereas ->_u._ext.nscount is set by __libc_res_nsend only after local
+    initializations.
+
++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.
++
+diff --git a/resolv/res_init.c b/resolv/res_init.c
+index 128004a..02590fb 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]);
diff --git a/debian/patches/series b/debian/patches/series
index 79e347f..148444f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -212,3 +212,4 @@ any/local-bootstrap-headers.diff
 any/submitted-argp-attribute.diff
 any/submitted-dlopen-noload.diff
 any/cvs-tst-malloc-thread-exit.diff
+any/cvs-resolver-leak.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-glibc/glibc.git


Reply to: