qemu_snapshot: revert: remove cleanup label

Now the cleanup label is not necessary so we can drop it.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Pavel Hrdina 2021-11-25 17:08:35 +01:00
parent e799743786
commit 2bbbb201ee

View File

@ -1967,13 +1967,13 @@ qemuSnapshotRevert(virDomainObj *vm,
if (qemuDomainHasBlockjob(vm, false)) { if (qemuDomainHasBlockjob(vm, false)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("domain has active block job")); _("domain has active block job"));
goto cleanup; return -1;
} }
if (qemuProcessBeginJob(driver, vm, if (qemuProcessBeginJob(driver, vm,
VIR_DOMAIN_JOB_OPERATION_SNAPSHOT_REVERT, VIR_DOMAIN_JOB_OPERATION_SNAPSHOT_REVERT,
flags) < 0) flags) < 0)
goto cleanup; return -1;
if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot))) if (!(snap = qemuSnapObjFromSnapshot(vm, snapshot)))
goto endjob; goto endjob;
@ -2210,7 +2210,6 @@ qemuSnapshotRevert(virDomainObj *vm,
endjob: endjob:
qemuProcessEndJob(driver, vm); qemuProcessEndJob(driver, vm);
cleanup:
if (ret == 0) { if (ret == 0) {
qemuSnapshotSetCurrent(vm, snap); qemuSnapshotSetCurrent(vm, snap);
if (qemuDomainSnapshotWriteMetadata(vm, snap, if (qemuDomainSnapshotWriteMetadata(vm, snap,