mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 06:03:52 +03:00
qemuCheckpointDiscardBitmaps: Refuse to delete checkpoint with NULL bitmap name
When a checkpoint is redefined without providing the domain XML, we might end up with a definition where the per-disk bitmap name is not set. Trying to delete such checkpoint would lead to a crash. Refuse such deletion. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1941600 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f763b6e439
commit
3a340872f8
@ -206,6 +206,13 @@ qemuCheckpointDiscardBitmaps(virDomainObjPtr vm,
|
||||
if (chkdisk->type != VIR_DOMAIN_CHECKPOINT_TYPE_BITMAP)
|
||||
continue;
|
||||
|
||||
if (!chkdisk->bitmap) {
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("missing bitmap name for disk '%s' of checkpoint '%s'"),
|
||||
chkdisk->name, chkdef->parent.name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (qemuCheckpointDiscardDiskBitmaps(domdisk->src, blockNamedNodeData,
|
||||
chkdisk->bitmap,
|
||||
actions, domdisk->dst,
|
||||
|
Loading…
x
Reference in New Issue
Block a user