Check that the value is less than 0.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 4d77fd6f6a..41a124d215 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15533,7 +15533,7 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
if (blockdev) {
if (qemuBlockSnapshotAddBlockdev(actions,
diskdata[i].disk,
- diskdata[i].src))
+ diskdata[i].src) < 0)
goto cleanup;
} else {
if (qemuBlockSnapshotAddLegacy(actions,
--
2.23.0