mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemu_driver.c: avoid NULL dereference upon disk-op failure
* src/qemu/qemu_driver.c (qemudDomainAttachDevice): Call virCgroupDenyDevicePath only if cgroup is non-NULL.
This commit is contained in:
parent
c1237818d2
commit
eebf932e94
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user