]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
fix: potential null pointer dereference 2926/head
authorKrzysztof Kepka <krzysztof.kepka@intel.com>
Fri, 17 Jan 2020 13:01:44 +0000 (13:01 +0000)
committerKepka, Krzysztof <krzysztof.kepka@intel.com>
Fri, 17 Jan 2020 14:27:23 +0000 (15:27 +0100)
src/redfish.c

index 04e6fc8d895c0bc8376ef9f1e3bd51ccab39d615..947fb392e42e8e6c224a8916464776dc456a7b6d 100644 (file)
@@ -802,7 +802,8 @@ static void redfish_process_payload_property(const redfish_property_t *prop,
     if (ds == NULL)
       continue;
 
-    v1.values = &(value_t){0};
+    value_t tmp = {0};
+    v1.values = &tmp;
     redfish_convert_val(&value, type, v1.values, ds->ds[0].type);
 
     sstrncpy(v1.host, serv->name, sizeof(v1.host));