From: Ruben Kerkhof Date: Sat, 28 Nov 2015 12:29:08 +0000 (+0100) Subject: mqtt: plug leak on error path X-Git-Tag: collectd-5.6.0~566^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=77b504d27def0c6722c13e71038b6ea1637d1069;p=collectd.git mqtt: plug leak on error path --- diff --git a/src/mqtt.c b/src/mqtt.c index 7003fcc6..c7581e9a 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -221,6 +221,7 @@ static void on_message ( if (payload == NULL) { ERROR ("mqtt plugin: malloc for payload buffer failed."); + sfree (vl.values); return; } memmove (payload, msg->payload, msg->payloadlen);