From: Eric Blake Date: Sat, 23 Mar 2019 22:04:43 +0000 (-0500) Subject: snapshot: Avoid infloop during REDEFINE X-Git-Tag: v5.2.0-rc1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9884b2d185b8a30a9bef5aea93ae5c2597766713;p=thirdparty%2Flibvirt.git snapshot: Avoid infloop during REDEFINE Commit 55c2ab3e accidentally introduced an infinite loop while checking whether a redefined snapshot would cause an infinite loop in chasing its parents back to a root. Alas, 'make check' did not catch it, so my next patch will be a testsuite improvement that would have hung and prevented the bug from being checked in to begin with. Signed-off-by: Eric Blake Acked-by: Michal Privoznik --- diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index 52abafab0f..cc3f71ab6f 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -962,6 +962,7 @@ virDomainSnapshotRedefinePrep(virDomainPtr domain, vm->def->name); break; } + otherdef = virDomainSnapshotObjGetDef(other); } }