Merge pull request #1377 from rubenk/mqtt-fix-out-of-bounds-write
[collectd.git] / src / mqtt.c
index d6bcdce..8bc412c 100644 (file)
@@ -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);