projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #1455 from rubenk/configure-ac-remove-dead-code
[collectd.git]
/
src
/
mqtt.c
diff --git
a/src/mqtt.c
b/src/mqtt.c
index
7003fcc
..
8bc412c
100644
(file)
--- 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.");
if (payload == NULL)
{
ERROR ("mqtt plugin: malloc for payload buffer failed.");
+ sfree (vl.values);
return;
}
memmove (payload, msg->payload, msg->payloadlen);
return;
}
memmove (payload, msg->payload, msg->payloadlen);
@@
-728,7
+729,7
@@
static int mqtt_config_subscriber (oconfig_item_t *ci)
ERROR ("mqtt plugin: Unknown config option: %s", child->key);
}
ERROR ("mqtt plugin: Unknown config option: %s", child->key);
}
- tmp = realloc (subscribers, sizeof (*subscribers) *
subscribers_num
);
+ tmp = realloc (subscribers, sizeof (*subscribers) *
(subscribers_num + 1)
);
if (tmp == NULL)
{
ERROR ("mqtt plugin: realloc failed.");
if (tmp == NULL)
{
ERROR ("mqtt plugin: realloc failed.");