[PATCH v3 1/9] qemu: fix domain device validation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the virDomainCapsDeviceDefValidate() function returned an error
status (-1), we were aborting the function early, but returning the
default return value (0). This patch properly returns an error in that
case.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 09b6c9a570..92a0df2d75 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -7211,7 +7211,7 @@ qemuDomainDeviceDefValidate(const virDomainDeviceDef *dev,
     if ((ret = qemuDomainDeviceDefValidateAddress(dev, qemuCaps)) < 0)
         goto cleanup;
 
-    if (virDomainCapsDeviceDefValidate(domCaps, dev, def) < 0)
+    if ((ret = virDomainCapsDeviceDefValidate(domCaps, dev, def)) < 0)
         goto cleanup;
 
     switch ((virDomainDeviceType)dev->type) {
-- 
2.21.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux