qemu: Check for explicit failure of qemuBlockSnapshotAddBlockdev

Check that the value is less than 0.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Peter Krempa 2019-11-28 14:58:55 +01:00
parent 1326fd1ce6
commit 4258eba6ed

View File

@ -15592,7 +15592,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,