]> git.proxmox.com Git - qemu.git/blobdiff - migration-tcp.c
Fix possibly SEGV in tcp migration error case.
[qemu.git] / migration-tcp.c
index 64b64d6b9835cf5cc44180ceda2a584cf782df3e..fe6288fc437c5a56e7091dae12a8b807dabd8b76 100644 (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);