Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/collectd/, app-admin/collectd/files/
Date: Thu, 01 Jun 2017 18:49:47
Message-Id: 1496342975.d7dcb46c7a5186ef22a1373f7b99dbf46382d2d6.whissi@gentoo
1 commit: d7dcb46c7a5186ef22a1373f7b99dbf46382d2d6
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 1 18:49:20 2017 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 1 18:49:35 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7dcb46c
7
8 app-admin/collectd: Rev bump to fix a memory leak in bind plugin
9
10 See https://github.com/collectd/collectd/issues/2303
11
12 Package-Manager: Portage-2.3.5, Repoman-2.3.2
13
14 ...td-5.6.2-r3.ebuild => collectd-5.6.2-r4.ebuild} | 1 +
15 .../collectd/files/collectd-5.6.2-issue2303.patch | 44 ++++++++++++++++++++++
16 2 files changed, 45 insertions(+)
17
18 diff --git a/app-admin/collectd/collectd-5.6.2-r3.ebuild b/app-admin/collectd/collectd-5.6.2-r4.ebuild
19 similarity index 99%
20 rename from app-admin/collectd/collectd-5.6.2-r3.ebuild
21 rename to app-admin/collectd/collectd-5.6.2-r4.ebuild
22 index 950afe301fc..08fcec3a65a 100644
23 --- a/app-admin/collectd/collectd-5.6.2-r3.ebuild
24 +++ b/app-admin/collectd/collectd-5.6.2-r4.ebuild
25 @@ -153,6 +153,7 @@ REQUIRED_USE="
26 PATCHES=(
27 "${FILESDIR}"/${PN}-5.6.0-gentoo.patch
28 "${FILESDIR}"/${PN}-5.6.2-CVE-2017-7401.patch
29 + "${FILESDIR}"/${PN}-5.6.2-issue2303.patch
30 )
31
32 # @FUNCTION: collectd_plugin_kernel_linux
33
34 diff --git a/app-admin/collectd/files/collectd-5.6.2-issue2303.patch b/app-admin/collectd/files/collectd-5.6.2-issue2303.patch
35 new file mode 100644
36 index 00000000000..0fffcd6b922
37 --- /dev/null
38 +++ b/app-admin/collectd/files/collectd-5.6.2-issue2303.patch
39 @@ -0,0 +1,44 @@
40 +From fd01cdd0546ccbbda7f4cf5db2d0ae28e1e770cd Mon Sep 17 00:00:00 2001
41 +From: Ruben Kerkhof <ruben@××××××××××××.com>
42 +Date: Tue, 30 May 2017 17:25:17 +0200
43 +Subject: [PATCH] Bind plugin: plug a few leaks
44 +
45 +Fixes: #2303
46 +---
47 + src/bind.c | 10 ++++++++--
48 + 1 file changed, 8 insertions(+), 2 deletions(-)
49 +
50 +diff --git a/src/bind.c b/src/bind.c
51 +index 4860f1b604..853b9c26a3 100644
52 +--- a/src/bind.c
53 ++++ b/src/bind.c
54 +@@ -526,8 +526,10 @@ static int bind_parse_generic_name_value(const char *xpath_expression, /* {{{ */
55 + status = bind_xml_read_gauge(doc, counter, &value.gauge);
56 + else
57 + status = bind_xml_read_derive(doc, counter, &value.derive);
58 +- if (status != 0)
59 ++ if (status != 0) {
60 ++ xmlFree(name);
61 + continue;
62 ++ }
63 +
64 + status = (*list_callback)(name, value, current_time, user_data);
65 + if (status == 0)
66 +@@ -659,12 +661,16 @@ static int bind_parse_generic_name_attr_value_list(
67 + status = bind_xml_read_gauge(doc, child, &value.gauge);
68 + else
69 + status = bind_xml_read_derive(doc, child, &value.derive);
70 +- if (status != 0)
71 ++ if (status != 0) {
72 ++ xmlFree(attr_name);
73 + continue;
74 ++ }
75 +
76 + status = (*list_callback)(attr_name, value, current_time, user_data);
77 + if (status == 0)
78 + num_entries++;
79 ++
80 ++ xmlFree(attr_name);
81 + }
82 + }
83 +