提交 9fc616cc 编写于 作者: M Michal Privoznik

qemuDomainGetResctrlMonData: Dereference resctrl monitor iff not NULL

If the host doesn't have resctrl then the monitor is going to be
NULL and we must avoid dereferencing it.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 9801ee89
......@@ -20744,7 +20744,8 @@ qemuDomainGetResctrlMonData(virQEMUDriverPtr driver,
caps = virQEMUDriverGetCapabilities(driver, false);
if (tag == VIR_RESCTRL_MONITOR_TYPE_CACHE) {
features = caps->host.cache.monitor->features;
if (caps->host.cache.monitor)
features = caps->host.cache.monitor->features;
} else {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("Unsupported resctrl monitor type"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册