summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b4e044d)
raw | patch | inline | side by side (parent: b4e044d)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 17 Sep 2008 17:30:47 +0000 (19:30 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 17 Sep 2008 17:30:47 +0000 (19:30 +0200) |
Trivial upstream patch to fix a possible file descriptor leak in the memcached
plugin.
plugin.
debian/changelog | patch | blob | history | |
debian/patches/00list | patch | blob | history | |
debian/patches/memcached_fdleak.dpatch | [new file with mode: 0755] | patch | blob |
diff --git a/debian/changelog b/debian/changelog
index 8d8d8fbf0cf68ff32452cb449b55f3f3a4649acd..1f60063f261ee3f5aec98af371f16f11e22c757d 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
fix a possible memory leak.
* Added debian/patches/snmp_memleak.dpatch - trivial upstream patch to fix a
possible memory leak in the snmp plugin.
+ * Added debian/patches/memcached_fdleak.dpatch - trivial upstream patch to
+ fix a possible file descriptor leak in the memcached plugin.
- -- Sebastian Harl <sh@tokkee.org> Wed, 17 Sep 2008 19:17:55 +0200
+ -- Sebastian Harl <sh@tokkee.org> Wed, 17 Sep 2008 19:29:55 +0200
collectd (4.4.2-1) unstable; urgency=low
diff --git a/debian/patches/00list b/debian/patches/00list
index 9b2db92184df6ebfe0b63fa4f1fa408ca5d140a6..3a38f12ece54faa822c6269fb8f5e8220d2ee40f 100644 (file)
--- a/debian/patches/00list
+++ b/debian/patches/00list
memory_libstatgrab.dpatch
collectd_memleak.dpatch
snmp_memleak.dpatch
+memcached_fdleak.dpatch
diff --git a/debian/patches/memcached_fdleak.dpatch b/debian/patches/memcached_fdleak.dpatch
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## memcached_fdleak.dpatch by Sebastian Harl <sh@tokkee.org>
+##
+## DP: Fixed a possible file descriptor leak in the memcached plugin.
+## DP: This has been reported as upstream bug #26.
+## DP: (This is based on upstream Git commit
+## DP: e7929dac268957cbbd9082717759c3917ac1b51e)
+
+@DPATCH@
+
+diff a/src/memcached.c b/src/memcached.c
+--- a/src/memcached.c
++++ b/src/memcached.c
+@@ -137,6 +137,8 @@ static int memcached_query_daemon (char *buffer, int buffer_size) /* {{{ */
+
+ if (n <= 0) {
+ ERROR ("memcached: poll() failed or timed out");
++ shutdown (fd, SHUT_RDWR);
++ close (fd);
+ return -1;
+ }
+ }