From 7c63535463ed2ea57d86a1609ceeff80afa9dc0a Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Sun, 5 Feb 2017 19:40:33 +0000 Subject: [PATCH] mqtt plugin: Fix resource leak. Gbp-Pq: Name mqtt_resource_leak.patch --- src/mqtt.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.30.2