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: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1371%2Fhead;p=thirdparty%2Fcollectd.git mqtt: plug leak on error path --- diff --git a/src/mqtt.c b/src/mqtt.c index 7003fcc63..c7581e9a8 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);