From: Peter Krempa Date: Wed, 25 Jun 2014 16:11:17 +0000 (+0200) Subject: qemu: blockcopy: Don't remove existing disk mirror info X-Git-Tag: v1.2.6-rc2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02b364e186d487f54ed410c01af042f23e812d42;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 775dc4eb7d..d34da6f5b8 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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;