Signed-off-by: Nikolay Shirokovskiy <nikolay.shirokovskiy@openvz.org>
---
src/qemu/qemu_snapshot.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_snapshot.c b/src/qemu/qemu_snapshot.c
index df9da4613f..5d622592c3 100644
--- a/src/qemu/qemu_snapshot.c
+++ b/src/qemu/qemu_snapshot.c
@@ -297,21 +297,19 @@ qemuSnapshotCreateActiveInternal(virQEMUDriver *driver,
int ret = -1;
if (!qemuMigrationSrcIsAllowed(driver, vm, false, 0))
- goto cleanup;
+ return -1;
if (halt) {
if (qemuProcessStopCPUs(driver, vm, VIR_DOMAIN_PAUSED_SAVE,
VIR_ASYNC_JOB_SNAPSHOT) < 0)
- goto cleanup;
+ return -1;
resume = true;
}
if (qemuDomainObjEnterMonitorAsync(driver, vm,
- VIR_ASYNC_JOB_SNAPSHOT) < 0) {
- resume = false;
- goto cleanup;
- }
+ VIR_ASYNC_JOB_SNAPSHOT) < 0)
+ return -1;
ret = qemuMonitorCreateSnapshot(priv->mon, snap->def->name);
qemuDomainObjExitMonitor(vm);
--
2.35.1