提交 c07ef7c5 编写于 作者: J Ján Tomko

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: NJán Tomko <jtomko@redhat.com>
Fixes: b168fa88Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
Reviewed-by: NAndrea Bolognani <abologna@redhat.com>
上级 26a42e73
...@@ -14654,7 +14654,7 @@ qemuDomainSnapshotCreateInactiveExternal(virQEMUDriverPtr driver, ...@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册