If we are updating the current checkpoint when redefining by mentioning
the current checkpoint as a parent of the newly redefined one we don't
have to clear it first.
Signed-off-by: Peter Krempa <pkrempa(a)redhat.com>
---
src/conf/checkpoint_conf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c
index 7f2cfd7f4c..cbff2a0db0 100644
--- a/src/conf/checkpoint_conf.c
+++ b/src/conf/checkpoint_conf.c
@@ -562,10 +562,8 @@ virDomainCheckpointRedefinePrep(virDomainObjPtr vm,
if (def->parent.parent_name &&
(parent = virDomainCheckpointFindByName(vm->checkpoints,
def->parent.parent_name))) {
- if (parent == virDomainCheckpointGetCurrent(vm->checkpoints)) {
+ if (parent == virDomainCheckpointGetCurrent(vm->checkpoints))
*update_current = true;
- virDomainCheckpointSetCurrent(vm->checkpoints, NULL);
- }
}
other = virDomainCheckpointFindByName(vm->checkpoints, def->parent.name);
--
2.21.0