aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migration-tcp.c2
-rw-r--r--migration-unix.c2
-rw-r--r--savevm.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index bb27ce832a..1279cc9677 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -103,6 +103,8 @@ static void tcp_accept_incoming_migration(void *opaque)
process_incoming_migration(f);
qemu_fclose(f);
+ return;
+
out:
closesocket(c);
}
diff --git a/migration-unix.c b/migration-unix.c
index 9b5521edec..96ea71b787 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -103,6 +103,8 @@ static void unix_accept_incoming_migration(void *opaque)
process_incoming_migration(f);
qemu_fclose(f);
+ return;
+
out:
close(c);
}
diff --git a/savevm.c b/savevm.c
index 0ab1ad4afd..cdad3ad8e4 100644
--- 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;
}