summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 48cf5a7)
raw | patch | inline | side by side (parent: 48cf5a7)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 2 Apr 2016 14:53:16 +0000 (16:53 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 2 Apr 2016 14:53:16 +0000 (16:53 +0200) |
Else we might free an uninitialized ptr
CID #81392
CID #81392
src/write_sensu.c | patch | blob | history |
diff --git a/src/write_sensu.c b/src/write_sensu.c
index c427467c5b2d8059d51be502f953229817e79099..475354c83bb0110c89b81dde3e85cb33a3203953 100644 (file)
--- a/src/write_sensu.c
+++ b/src/write_sensu.c
static char *build_json_str_list(const char *tag, struct str_list const *list) /* {{{ */
{
int res;
- char *ret_str;
+ char *ret_str = NULL;
char *temp_str;
int i;
if (list->nb_strs == 0) {