1
0
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:
Jim Meyering 2009-12-16 14:15:50 +01:00
parent c1237818d2
commit eebf932e94

View File

@ -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);
}