mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00:00
esx: Fix check in esxDomainGetInfo's perf metric handling
This commit is contained in:
parent
534056c73d
commit
6c4b04142b
@ -2329,15 +2329,17 @@ esxDomainGetInfo(virDomainPtr domain, virDomainInfoPtr info)
|
||||
perfEntityMetric =
|
||||
esxVI_PerfEntityMetric_DynamicCast(perfEntityMetricBase);
|
||||
|
||||
if (perfMetricIntSeries == NULL) {
|
||||
VIR_ERROR0(_("QueryPerf returned object with unexpected type"));
|
||||
if (perfEntityMetric == NULL) {
|
||||
VIR_ERROR(_("QueryPerf returned object with unexpected type '%s'"),
|
||||
esxVI_Type_ToString(perfEntityMetricBase->_type));
|
||||
}
|
||||
|
||||
perfMetricIntSeries =
|
||||
esxVI_PerfMetricIntSeries_DynamicCast(perfEntityMetric->value);
|
||||
|
||||
if (perfMetricIntSeries == NULL) {
|
||||
VIR_ERROR0(_("QueryPerf returned object with unexpected type"));
|
||||
VIR_ERROR(_("QueryPerf returned object with unexpected type '%s'"),
|
||||
esxVI_Type_ToString(perfEntityMetric->value->_type));
|
||||
}
|
||||
|
||||
for (; perfMetricIntSeries != NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user