From: Denys Fedoryshchenko Date: Sun, 5 Feb 2017 19:40:33 +0000 (+0000) Subject: mqtt plugin: Fix resource leak. X-Git-Tag: archive/raspbian/5.12.0-3+rpi1~1^2^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7c63535463ed2ea57d86a1609ceeff80afa9dc0a;p=collectd.git mqtt plugin: Fix resource leak. Gbp-Pq: Name mqtt_resource_leak.patch --- diff --git a/src/mqtt.c b/src/mqtt.c index b578b99..7e6ce72 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);