]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot_conf: use alternate domain definition in virDomainSnapshotDefAssignExternalNames
authorPavel Hrdina <phrdina@redhat.com>
Wed, 1 Feb 2023 13:23:58 +0000 (14:23 +0100)
committerPavel Hrdina <phrdina@redhat.com>
Tue, 22 Aug 2023 14:06:05 +0000 (16:06 +0200)
commita0853c89fe4621ee0f6d466e7309c1ad4e5885a4
tree09c7aa57622921579a0ede1b9c5a4ec3a2eeaeb6
parent824e2a4a98d0ba33c3618558495a5ff34cb532b0
snapshot_conf: use alternate domain definition in virDomainSnapshotDefAssignExternalNames

Commit <ef3f3884a2432958bdd4ea0ce45509d47a91a453> introduced new
argument for virDomainSnapshotAlignDisks() that allows passing alternate
domain definition in case the snapshot parent.dom is NULL.

In case of redefining snapshot it will not hit the part of code that
unconditionally uses parent.dom as there will not be need to generate
default external file names.

It should be still fixed to make it safe. Future external snapshot
revert code will use this to generate default file names and in this
case it would crash.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/snapshot_conf.c