summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-24 22:08:22 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-24 22:08:22 +0000
commit1ef8f83c2a17ebc493867182608fc6ed2d2813f2 (patch)
treea48892a6deecec1d5fd40aa8226ad27483b50d49
parentc9d885008a415a7e3c3f1813a7e73410ff157c29 (diff)
downloadqemu-1ef8f83c2a17ebc493867182608fc6ed2d2813f2.tar.gz
qemu-1ef8f83c2a17ebc493867182608fc6ed2d2813f2.tar.bz2
qemu-1ef8f83c2a17ebc493867182608fc6ed2d2813f2.zip
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
-rw-r--r--migration-tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index 64b64d6b98..fe6288fc43 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -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);