aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp>2010-06-10 06:50:10 +0900
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-14 15:46:28 -0500
commit304e3a7c802969811fe82b6247f63fcba063f52e (patch)
treeab39133951665f811186d8d1c604c6ebf58ed4e8
parentfaa1f8ddc18fe30257f2ed6c378fce848b159dab (diff)
migration-tcp: call migrate_fd_error() instead of close() and free().
This patch fixes the following error report. When changing migration-tcp.c to call migrate_fd_error() instead of close() and free() by itself, monitor is resumed, and returns allocated mig_state is set to current_migration in migration.c allows us to print "info migrate". Reported-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Yoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--migration-tcp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index 95ce722fec..43af2e0450 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -128,9 +128,7 @@ MigrationState *tcp_start_outgoing_migration(Monitor *mon,
if (ret < 0 && ret != -EINPROGRESS && ret != -EWOULDBLOCK) {
DPRINTF("connect failed\n");
- close(s->fd);
- qemu_free(s);
- return NULL;
+ migrate_fd_error(s);
} else if (ret >= 0)
migrate_fd_connect(s);