Code

Added debian/patches/collectd_memleak.dpatch.
authorSebastian Harl <sh@tokkee.org>
Wed, 17 Sep 2008 08:30:30 +0000 (10:30 +0200)
committerSebastian Harl <sh@tokkee.org>
Wed, 17 Sep 2008 08:30:30 +0000 (10:30 +0200)
Trivial upstream patch to fix a possible memory leak.

debian/changelog
debian/patches/00list
debian/patches/collectd_memleak.dpatch [new file with mode: 0755]

index 3481a96a4cf7fbd81916b23d5c33ae9d30ccf0a1..afc5acf5b068c5fa46e8838958a98dd77f44643d 100644 (file)
@@ -6,8 +6,10 @@ collectd (4.4.2-2) unstable; urgency=low
     loading the ipmi plugin caused by that work around (Closes: #494665).
   * Added debian/patches/memory_libstatgrab.dpatch - trivial upstream patch to
     fix a typo in the libstatgrab code of the memory plugin.
+  * Added debian/patches/collectd_memleak.dpatch - trivial upstream patch to
+    fix a possible memory leak.
 
- -- Sebastian Harl <sh@tokkee.org>  Wed, 17 Sep 2008 10:19:47 +0200
+ -- Sebastian Harl <sh@tokkee.org>  Wed, 17 Sep 2008 10:28:36 +0200
 
 collectd (4.4.2-1) unstable; urgency=low
 
index bc01ecdd43e05821757cf5ee8e8a92c60b473dc5..d2a82d98d7dcb5e4ef9db1b389fbde6470e3d70f 100644 (file)
@@ -2,4 +2,5 @@ rrd_filter_path.dpatch
 collection_conf_path.dpatch
 myplugin_strcpy.dpatch
 memory_libstatgrab.dpatch
+collectd_memleak.dpatch
 
diff --git a/debian/patches/collectd_memleak.dpatch b/debian/patches/collectd_memleak.dpatch
new file mode 100755 (executable)
index 0000000..132f2c7
--- /dev/null
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## collectd_memleak.dpatch by Peter Holik <holik@it-technology.at>
+##
+## DP: Free allocated memory before returning in an error condition.
+## DP: (This is upstream Git commit 111a5eb7b68da0478b16de31dff422a213a03799)
+
+@DPATCH@
+
+diff a/src/utils_threshold.c b/src/utils_threshold.c
+--- a/src/utils_threshold.c
++++ b/src/utils_threshold.c
+@@ -711,6 +711,7 @@ int ut_check_interesting (const char *name)
+   if (status != 0)
+   {
+     ERROR ("ut_check_interesting: parse_identifier failed.");
++    sfree (name_copy);
+     return (-1);
+   }