diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2017-06-01 20:49:20 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2017-06-01 20:49:35 +0200 |
commit | d7dcb46c7a5186ef22a1373f7b99dbf46382d2d6 (patch) | |
tree | 3547b737465a7ae7922400f1db647d50f952ee40 /app-admin/collectd | |
parent | net-vpn/wireguard: work around hotplug+!padata (diff) | |
download | gentoo-d7dcb46c7a5186ef22a1373f7b99dbf46382d2d6.tar.gz gentoo-d7dcb46c7a5186ef22a1373f7b99dbf46382d2d6.tar.bz2 gentoo-d7dcb46c7a5186ef22a1373f7b99dbf46382d2d6.zip |
app-admin/collectd: Rev bump to fix a memory leak in bind plugin
See https://github.com/collectd/collectd/issues/2303
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Diffstat (limited to 'app-admin/collectd')
-rw-r--r-- | app-admin/collectd/collectd-5.6.2-r4.ebuild (renamed from app-admin/collectd/collectd-5.6.2-r3.ebuild) | 1 | ||||
-rw-r--r-- | app-admin/collectd/files/collectd-5.6.2-issue2303.patch | 44 |
2 files changed, 45 insertions, 0 deletions
diff --git a/app-admin/collectd/collectd-5.6.2-r3.ebuild b/app-admin/collectd/collectd-5.6.2-r4.ebuild index 950afe301fc7..08fcec3a65a6 100644 --- a/app-admin/collectd/collectd-5.6.2-r3.ebuild +++ b/app-admin/collectd/collectd-5.6.2-r4.ebuild @@ -153,6 +153,7 @@ REQUIRED_USE=" PATCHES=( "${FILESDIR}"/${PN}-5.6.0-gentoo.patch "${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch + "${FILESDIR}"/${PN}-5.6.2-issue2303.patch ) # @FUNCTION: collectd_plugin_kernel_linux diff --git a/app-admin/collectd/files/collectd-5.6.2-issue2303.patch b/app-admin/collectd/files/collectd-5.6.2-issue2303.patch new file mode 100644 index 000000000000..0fffcd6b9224 --- /dev/null +++ b/app-admin/collectd/files/collectd-5.6.2-issue2303.patch @@ -0,0 +1,44 @@ +From fd01cdd0546ccbbda7f4cf5db2d0ae28e1e770cd Mon Sep 17 00:00:00 2001 +From: Ruben Kerkhof <ruben@rubenkerkhof.com> +Date: Tue, 30 May 2017 17:25:17 +0200 +Subject: [PATCH] Bind plugin: plug a few leaks + +Fixes: #2303 +--- + src/bind.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/bind.c b/src/bind.c +index 4860f1b604..853b9c26a3 100644 +--- a/src/bind.c ++++ b/src/bind.c +@@ -526,8 +526,10 @@ static int bind_parse_generic_name_value(const char *xpath_expression, /* {{{ */ + status = bind_xml_read_gauge(doc, counter, &value.gauge); + else + status = bind_xml_read_derive(doc, counter, &value.derive); +- if (status != 0) ++ if (status != 0) { ++ xmlFree(name); + continue; ++ } + + status = (*list_callback)(name, value, current_time, user_data); + if (status == 0) +@@ -659,12 +661,16 @@ static int bind_parse_generic_name_attr_value_list( + status = bind_xml_read_gauge(doc, child, &value.gauge); + else + status = bind_xml_read_derive(doc, child, &value.derive); +- if (status != 0) ++ if (status != 0) { ++ xmlFree(attr_name); + continue; ++ } + + status = (*list_callback)(attr_name, value, current_time, user_data); + if (status == 0) + num_entries++; ++ ++ xmlFree(attr_name); + } + } + |