aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Denemark <jdenemar@redhat.com>2012-02-15 16:48:54 +0100
committerDoug Goldstein <cardoe@cardoe.com>2012-02-19 16:53:50 -0600
commiteee22302f143f8a9bd74c575b98547890993eaa7 (patch)
treec01cbdf4a45deda2e714d5ce84187d7db74145ef
parentqemu: Fix segfault when host CPU is empty (diff)
downloadlibvirt-eee22302f143f8a9bd74c575b98547890993eaa7.tar.gz
libvirt-eee22302f143f8a9bd74c575b98547890993eaa7.tar.bz2
libvirt-eee22302f143f8a9bd74c575b98547890993eaa7.zip
qemu: Unlock monitor when connecting to dest qemu fails
When migrating a qemu domain, we enter the monitor, send some commands, try to connect to destination qemu, send other commands, end exit the monitor. However, if we couldn't connect to destination qemu we forgot to exit the monitor. Bug introduced by commit d9d518b1c8ef3b65658cc91f85ba33a63c0959a4.
-rw-r--r--src/qemu/qemu_migration.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 12cfbdea2..ea4185e32 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1624,8 +1624,10 @@ qemuMigrationRun(struct qemud_driver *driver,
/* connect to the destination qemu if needed */
if (spec->destType == MIGRATION_DEST_CONNECT_HOST &&
- qemuMigrationConnect(driver, vm, spec) < 0)
+ qemuMigrationConnect(driver, vm, spec) < 0) {
+ qemuDomainObjExitMonitorWithDriver(driver, vm);
goto cleanup;
+ }
switch (spec->destType) {
case MIGRATION_DEST_HOST: