[libvirt PATCH 4/4] qemu: snapshot: go through cleanup on error

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

 



A recent commit added an error check for too-nested backing chains
followed by a return, even though errors above jump to cleanup.

Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
Fixes: b168fa88b85dec181882816ab65a59a6c4500667
---
 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 fc080b4a48..048855b533 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -14654,7 +14654,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
             snapdisk->src->format = VIR_STORAGE_FILE_QCOW2;
 
         if (qemuDomainStorageSourceValidateDepth(defdisk->src, 1, defdisk->dst) < 0)
-            return -1;
+            goto cleanup;
 
         /* creates cmd line args: qemu-img create -f qcow2 -o */
         if (!(cmd = virCommandNewArgList(qemuImgPath,
-- 
2.21.0





[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