summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9b7dee8)
raw | patch | inline | side by side (parent: 9b7dee8)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 5 Dec 2015 10:47:46 +0000 (11:47 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 5 Dec 2015 20:25:30 +0000 (21:25 +0100) |
CID #37999
Signed-off-by: Florian Forster <octo@collectd.org>
Signed-off-by: Florian Forster <octo@collectd.org>
src/write_sensu.c | patch | blob | history |
diff --git a/src/write_sensu.c b/src/write_sensu.c
index f7803e86a24cf1194dd7ee2d1651b1a4d8628694..507018fdd1f6a7688a0672679fdcd63628d58fe3 100644 (file)
--- a/src/write_sensu.c
+++ b/src/write_sensu.c
char *handlers_str = build_json_str_list("handlers", &(host->notification_handlers));
if (handlers_str == NULL) {
ERROR("write_sensu plugin: Unable to alloc memory");
+ free(ret_str);
return NULL;
}
// incorporate the handlers
char *msg = replace_json_reserved(n->message);
if (msg == NULL) {
ERROR("write_sensu plugin: Unable to alloc memory");
+ free(ret_str);
return NULL;
}
res = asprintf(&temp_str, "%s, \"output\": \"%s - %s\"", ret_str, severity, msg);