summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d7bc9c)
raw | patch | inline | side by side (parent: 4d7bc9c)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 2 Apr 2016 13:53:15 +0000 (15:53 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 2 Apr 2016 14:06:40 +0000 (16:06 +0200) |
Fixes CID #37998
src/write_sensu.c | patch | blob | history |
diff --git a/src/write_sensu.c b/src/write_sensu.c
index 5e231a5806297d1b75509a113f4e642e30167d53..c427467c5b2d8059d51be502f953229817e79099 100644 (file)
--- a/src/write_sensu.c
+++ b/src/write_sensu.c
@@ -192,6 +192,7 @@ static char *build_json_str_list(const char *tag, struct str_list const *list) /
res = asprintf(&temp_str, "\"%s\": [\"%s\"", tag, list->strs[0]);
if (res == -1) {
ERROR("write_sensu plugin: Unable to alloc memory");
+ free(ret_str);
return NULL;
}
for (i=1; i<list->nb_strs; i++) {