qemu: fix error propagation in qemuMigrationBegin

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

Signed-off-by: Michael Chapman <mike@very.puzzling.org>
This commit is contained in:
Michael Chapman 2015-03-30 13:40:59 +11:00 committed by Ján Tomko
parent 7578cc17f5
commit 77ddd0bba2

View File

@ -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;