The error path is unlikely thus saving the status XML even if we didn't
modify it does not add much burden.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/qemu/qemu_driver.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 97f7ad16bf..40ba50c8c0 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -15327,12 +15327,10 @@ qemuDomainSnapshotCreateDiskActive(virQEMUDriverPtr driver,
}
}
- if (ret == 0 || !do_transaction) {
- if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps)
< 0 ||
- (persist && virDomainSaveConfig(cfg->configDir, driver->caps,
- vm->newDef) < 0))
- ret = -1;
- }
+ if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm, driver->caps)
< 0 ||
+ (persist && virDomainSaveConfig(cfg->configDir, driver->caps,
+ vm->newDef) < 0))
+ ret = -1;
cleanup:
qemuDomainSnapshotDiskDataFree(diskdata, snapdef->ndisks, driver, vm);
--
2.21.0