summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);