[PATCH 2/4] qemu: fix error propagation in qemuMigrationBegin

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

 



If virCloseCallbacksSet fails, qemuMigrationBegin must return NULL to
indicate an error occurred.

Signed-off-by: Michael Chapman <mike@xxxxxxxxxxxxxxxxx>
---
 src/qemu/qemu_migration.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 9458606..21432c0 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -2745,8 +2745,10 @@ qemuMigrationBegin(virConnectPtr conn,
          * place.
          */
         if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
-                                 qemuMigrationCleanup) < 0)
+                                 qemuMigrationCleanup) < 0) {
+            VIR_FREE(xml);
             goto endjob;
+        }
         qemuMigrationJobContinue(vm);
     } else {
         goto endjob;
-- 
2.1.0

--
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]