From: Krzysztof Kepka Date: Fri, 17 Jan 2020 13:01:44 +0000 (+0000) Subject: fix: potential null pointer dereference X-Git-Tag: collectd-5.11.0~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2926%2Fhead;p=thirdparty%2Fcollectd.git fix: potential null pointer dereference --- diff --git a/src/redfish.c b/src/redfish.c index 04e6fc8d8..947fb392e 100644 --- a/src/redfish.c +++ b/src/redfish.c @@ -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));