提交 eebf932e 编写于 作者: J Jim Meyering

qemu_driver.c: avoid NULL dereference upon disk-op failure

* src/qemu/qemu_driver.c (qemudDomainAttachDevice): Call
virCgroupDenyDevicePath only if cgroup is non-NULL.
上级 c1237818
......@@ -5491,7 +5491,7 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
virDomainDiskDeviceTypeToString(dev->data.disk->device));
/* Fallthrough */
}
if (ret != 0) {
if (ret != 0 && cgroup) {
virCgroupDenyDevicePath(cgroup,
dev->data.disk->src);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册