From: Ruben Kerkhof Date: Sat, 2 Apr 2016 14:53:16 +0000 (+0200) Subject: write_sensu: initialize ret_str X-Git-Tag: collectd-5.6.0~365 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=38a67c0fb42f663d850ba83327eab5543431b1db;p=collectd.git write_sensu: initialize ret_str Else we might free an uninitialized ptr CID #81392 --- 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) {