Skip to content

Commit

Permalink
migration-tcp: call migrate_fd_error() instead of close() and free().
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Yoshiaki Tamura <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
  • Loading branch information
Yoshiaki Tamura authored and Anthony Liguori committed Jun 14, 2010
1 parent faa1f8d commit 304e3a7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions migration-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 304e3a7

Please sign in to comment.