提交 9dd5bc15 编写于 作者: E Eric Blake

qemu: Fix regression with undefine --snapshots-metadata

In refactoring the snapshot code to prepare for checkpoints, I changed
qemuDomainMomentDiscardAll to take a callback that would handle the
cleanup of either a snapshot or a checkpoint, but failed to set the
callback on one of the two snapshot callers.  As a result, 'virsh
undefine $dom --snapshots-metadata' crashed on a NULL function
dereference.

Fixes: a487890d
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1707708Signed-off-by: NEric Blake <eblake@redhat.com>
Acked-by: NPeter Krempa <pkrempa@redhat.com>
上级 9639f25e
...@@ -8664,7 +8664,8 @@ qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr driver, ...@@ -8664,7 +8664,8 @@ qemuDomainSnapshotDiscardAllMetadata(virQEMUDriverPtr driver,
virQEMUMomentRemove rem = { virQEMUMomentRemove rem = {
.driver = driver, .driver = driver,
.vm = vm, .vm = vm,
.metadata_only = true .metadata_only = true,
.momentDiscard = qemuDomainSnapshotDiscard,
}; };
virDomainSnapshotForEach(vm->snapshots, qemuDomainMomentDiscardAll, &rem); virDomainSnapshotForEach(vm->snapshots, qemuDomainMomentDiscardAll, &rem);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册