]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
snapshot: Avoid infloop during REDEFINE
authorEric Blake <eblake@redhat.com>
Sat, 23 Mar 2019 22:04:43 +0000 (17:04 -0500)
committerEric Blake <eblake@redhat.com>
Mon, 25 Mar 2019 13:50:45 +0000 (08:50 -0500)
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 <eblake@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/snapshot_conf.c

index 52abafab0f60497d50be3b22f1f85b9e53b720e0..cc3f71ab6f760349c489979f441bb276c62cd22c 100644 (file)
@@ -962,6 +962,7 @@ virDomainSnapshotRedefinePrep(virDomainPtr domain,
                          vm->def->name);
                 break;
             }
+            otherdef = virDomainSnapshotObjGetDef(other);
         }
     }