[PATCH 9/8] qemu: Don't overwrite existing error in qemuMigrationReset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.redhat.com/show_bug.cgi?id=1439130

Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 1feb320b8..d8222fe3b 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5871,15 +5871,22 @@ qemuMigrationReset(virQEMUDriverPtr driver,
                    qemuDomainAsyncJob job)
 {
     qemuMonitorMigrationCaps cap;
+    virErrorPtr err = virSaveLastError();
 
     if (!virDomainObjIsActive(vm))
-        return;
+        goto cleanup;
 
     if (qemuMigrationResetTLS(driver, vm, job) < 0)
-        return;
+        goto cleanup;
 
     for (cap = 0; cap < QEMU_MONITOR_MIGRATION_CAPS_LAST; cap++) {
         if (qemuMigrationSetOption(driver, vm, cap, false, job) < 0)
-            return;
+            goto cleanup;
+    }
+
+ cleanup:
+    if (err) {
+        virSetError(err);
+        virFreeError(err);
     }
 }
-- 
2.12.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux