mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 20:45:18 +00:00
qemu: snapshot: go through cleanup on error
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@redhat.com> Fixes: b168fa88b85dec181882816ab65a59a6c4500667 Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
26a42e7315
commit
c07ef7c563
@ -14654,7 +14654,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver,
|
|||||||
snapdisk->src->format = VIR_STORAGE_FILE_QCOW2;
|
snapdisk->src->format = VIR_STORAGE_FILE_QCOW2;
|
||||||
|
|
||||||
if (qemuDomainStorageSourceValidateDepth(defdisk->src, 1, defdisk->dst) < 0)
|
if (qemuDomainStorageSourceValidateDepth(defdisk->src, 1, defdisk->dst) < 0)
|
||||||
return -1;
|
goto cleanup;
|
||||||
|
|
||||||
/* creates cmd line args: qemu-img create -f qcow2 -o */
|
/* creates cmd line args: qemu-img create -f qcow2 -o */
|
||||||
if (!(cmd = virCommandNewArgList(qemuImgPath,
|
if (!(cmd = virCommandNewArgList(qemuImgPath,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user