1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-20 18:03:50 +03:00

qemu: blockcopy: Don't remove existing disk mirror info

When creating a new disk mirror the new struct is stored in a separate
variable until everything went well. The removed hunk would actually
remove existing mirror information for example when the api would be run
if a mirror still exists.
This commit is contained in:
Peter Krempa 2014-06-25 18:11:17 +02:00
parent 7dbfd12426
commit 02b364e186

View File

@ -15410,10 +15410,6 @@ qemuDomainBlockCopy(virDomainObjPtr vm,
endjob:
if (need_unlink && unlink(dest))
VIR_WARN("unable to unlink just-created %s", dest);
if (ret < 0 && disk) {
virStorageSourceFree(disk->mirror);
disk->mirror = NULL;
}
virStorageSourceFree(mirror);
if (!qemuDomainObjEndJob(driver, vm))
vm = NULL;