From 77ddd0bba2379b4ba33980d8f3976f9344451cca Mon Sep 17 00:00:00 2001 From: Michael Chapman Date: Mon, 30 Mar 2015 13:40:59 +1100 Subject: [PATCH] qemu: fix error propagation in qemuMigrationBegin If virCloseCallbacksSet fails, qemuMigrationBegin must return NULL to indicate an error occurred. Signed-off-by: Michael Chapman --- 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 8c45415b7e..724e3ff24b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2761,8 +2761,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;