migration: close socket QEMUFile from socket_close
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Aug 2012 08:50:26 +0000 (10:50 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 2 Nov 2012 17:35:07 +0000 (18:35 +0100)
The common suffix now is process_incoming_migration+qemu_fclose.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
migration-tcp.c
migration-unix.c
savevm.c

index bb27ce832abe530bbed803ff054a1aff0dd1a473..1279cc9677b42fd4a9fab275d21716cbc3e07b42 100644 (file)
@@ -103,6 +103,8 @@ static void tcp_accept_incoming_migration(void *opaque)
 
     process_incoming_migration(f);
     qemu_fclose(f);
+    return;
+
 out:
     closesocket(c);
 }
index 9b5521edececdb189c72642fd86adf6c0c915ebb..96ea71b787728ec3fedde4dc0ba5cd1c5fb53175 100644 (file)
@@ -103,6 +103,8 @@ static void unix_accept_incoming_migration(void *opaque)
 
     process_incoming_migration(f);
     qemu_fclose(f);
+    return;
+
 out:
     close(c);
 }
index 0ab1ad4afd7d6a8a0648e6ba4954b5a7e7a877fd..cdad3ad8e4c1a8b1f6cc1c01438c62d92a4a0908 100644 (file)
--- a/savevm.c
+++ b/savevm.c
@@ -213,6 +213,7 @@ static int socket_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
 static int socket_close(void *opaque)
 {
     QEMUFileSocket *s = opaque;
+    closesocket(s->fd);
     g_free(s);
     return 0;
 }