projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
46fc73a
)
mqtt plugin: Fix resource leak.
author
Denys Fedoryshchenko
<denys@visp.net.lb>
Sun, 5 Feb 2017 19:40:33 +0000
(19:40 +0000)
committer
Sebastian Andrzej Siewior
<sebastian@breakpoint.cc>
Sun, 5 Feb 2017 19:40:33 +0000
(19:40 +0000)
Gbp-Pq: Name mqtt_resource_leak.patch
src/mqtt.c
patch
|
blob
|
history
diff --git
a/src/mqtt.c
b/src/mqtt.c
index b578b99bb93505f27a344b88d512cad2d97aa432..7e6ce72284e04fcf82c6cb2bb7df1d92467b1ccf 100644
(file)
--- 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);