From 38a67c0fb42f663d850ba83327eab5543431b1db Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 2 Apr 2016 16:53:16 +0200 Subject: [PATCH] write_sensu: initialize ret_str Else we might free an uninitialized ptr CID #81392 --- src/write_sensu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write_sensu.c b/src/write_sensu.c index c427467c..475354c8 100644 --- a/src/write_sensu.c +++ b/src/write_sensu.c @@ -177,7 +177,7 @@ static void sensu_close_socket(struct sensu_host *host) /* {{{ */ 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) { -- 2.11.0