aboutsummaryrefslogtreecommitdiffstats
path: root/migration-tcp.c
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
commit88d2d9e09826c26060b063153db9bfefa5704f48 (patch)
treea48892a6deecec1d5fd40aa8226ad27483b50d49 /migration-tcp.c
parentc1d366653207033b811c85da8c839729786451a5 (diff)
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
Diffstat (limited to 'migration-tcp.c')
-rw-r--r--migration-tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index 64b64d6b9..fe6288fc4 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);