From: Peter Krempa Date: Tue, 1 Oct 2019 06:10:18 +0000 (+0200) Subject: conf: checkpoint: Don't clear current checkpoint when redefining X-Git-Tag: v5.9.0-rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d374389974379a46eeb5d320d4014c092dc26582;p=thirdparty%2Flibvirt.git conf: checkpoint: Don't clear current checkpoint when redefining 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 Reviewed-by: Ján Tomko --- diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 71eac76a15..5b2723332d 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -556,10 +556,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);