From: Marc Fournier Date: Mon, 23 Jan 2017 19:19:42 +0000 (+0100) Subject: patches: add mqtt_resource_leak.patch X-Git-Tag: collectd-5.7.1-1^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3f9c019cef74a8ebc9ebceaf64f59f3e99c30f25;p=pkg-collectd.git patches: add mqtt_resource_leak.patch --- diff --git a/debian/changelog b/debian/changelog index f8563d9..c3e61f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ collectd (5.7.1-1) UNRELEASED; urgency=medium * New upstream release. - * debian/patches: drop dpdkstat-portable-format-string.patch, included - upstream. + * debian/patches: + - drop dpdkstat-portable-format-string.patch, included upstream. + - add mqtt_resource_leak.patch, fixing a connection leak. -- Marc Fournier Mon, 23 Jan 2017 09:23:07 +0100 diff --git a/debian/patches/mqtt_resource_leak.patch b/debian/patches/mqtt_resource_leak.patch new file mode 100644 index 0000000..c07b29c --- /dev/null +++ b/debian/patches/mqtt_resource_leak.patch @@ -0,0 +1,15 @@ +Description: mqtt plugin: Fix resource leak. +Author: Denys Fedoryshchenko + +diff --git a/src/mqtt.c b/src/mqtt.c +index 95deb0075..6b76af97b 100644 +--- a/src/mqtt.c ++++ b/src/mqtt.c +@@ -448,6 +448,7 @@ static int publish(mqtt_client_conf_t *conf, char const *topic, + * measure; we will try to reconnect the next time we have to publish a + * message */ + conf->connected = 0; ++ mosquitto_disconnect(conf->mosq); + + pthread_mutex_unlock(&conf->lock); + return (-1); diff --git a/debian/patches/series b/debian/patches/series index 8c3f46b..b0cc80c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,3 +2,4 @@ rrd_filter_path.patch collection_conf_path.patch myplugin_includes.patch nagios-debian-paths.patch +mqtt_resource_leak.patch