qemu: driver: Remove dead code from qemuDomainSnapshotUpdateDiskSources

dd->src is always allocated in this function as it contains the new
source for the snapshot which is meant to replace the disk source.

The label handling code executed if that source was not present thus is
dead code. Remove it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2019-08-12 12:16:35 +02:00
parent 280aa77eaf
commit 6129a04d49

View File

@ -15407,13 +15407,6 @@ qemuDomainSnapshotUpdateDiskSources(virQEMUDriverPtr driver,
virDomainObjPtr vm,
qemuDomainSnapshotDiskDataPtr dd)
{
if (!dd->src) {
/* Remove old metadata */
if (qemuSecurityMoveImageMetadata(driver, vm, dd->disk->src, NULL) < 0)
VIR_WARN("Unable to remove disk metadata on vm %s", vm->def->name);
return;
}
/* storage driver access won'd be needed */
if (dd->initialized)
virStorageFileDeinit(dd->src);