1 Description: mqtt plugin: Fix resource leak.
2 Author: Denys Fedoryshchenko <denys@visp.net.lb>
4 diff --git a/src/mqtt.c b/src/mqtt.c
5 index 95deb0075..6b76af97b 100644
6 --- a/src/mqtt.c
7 +++ b/src/mqtt.c
8 @@ -448,6 +448,7 @@ static int publish(mqtt_client_conf_t *conf, char const *topic,
9 * measure; we will try to reconnect the next time we have to publish a
10 * message */
11 conf->connected = 0;
12 + mosquitto_disconnect(conf->mosq);
14 pthread_mutex_unlock(&conf->lock);
15 return (-1);