Fix possibly SEGV in tcp migration error case.

Spotted by hpoussin.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5526 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
aliguori 2008-10-24 22:08:22 +00:00
parent c1d3666532
commit 88d2d9e098

View File

@ -283,7 +283,7 @@ MigrationState *tcp_start_outgoing_migration(const char *host_port,
dprintf("connect failed\n");
close(s->fd);
qemu_free(s);
s = NULL;
return NULL;
} else if (ret >= 0)
tcp_connect_migrate(s);