-
Incident report
-
Resolution: Duplicate
-
Trivial
-
3.2.4
-
None
-
Sprint 25, Sprint 26
-
0.125
If hypervisor has no associated datastores there is a potential problem with datastore variable being uninitialized:
checks_simple_vmware.c: In function ‘check_vcenter_hv_datastore_size’: checks_simple_vmware.c:1752:35: warning: ‘datastore’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (ZBX_MAX_UINT64 == datastore->free_space)
I'm not sure if in practice there can be hypervisors without datastores, but we need to fix it:
Index: src/zabbix_server/poller/checks_simple_vmware.c =================================================================== --- src/zabbix_server/poller/checks_simple_vmware.c (revision 67391) +++ src/zabbix_server/poller/checks_simple_vmware.c (working copy) @@ -1656,7 +1656,7 @@ zbx_vmware_service_t *service; zbx_vmware_hv_t *hv; int i, ret = SYSINFO_RET_FAIL, mode; - zbx_vmware_datastore_t *datastore; + zbx_vmware_datastore_t *datastore = NULL; zabbix_log(LOG_LEVEL_DEBUG, "In %s()", __function_name);