Commit d092c108 authored by Shahar Havivi's avatar Shahar Havivi Committed by Aurelien Jarno

Close socket file descriptor when qemu_accept fails

Signed-off-by: default avatarShahar Havivi <shaharh@redhat.com>
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent 01cc7ac6
......@@ -151,7 +151,7 @@ static void tcp_accept_incoming_migration(void *opaque)
if (c == -1) {
fprintf(stderr, "could not accept migration connection\n");
return;
goto out2;
}
f = qemu_fopen_socket(c);
......@@ -163,9 +163,10 @@ static void tcp_accept_incoming_migration(void *opaque)
process_incoming_migration(f);
qemu_fclose(f);
out:
close(c);
out2:
qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
close(s);
close(c);
}
int tcp_start_incoming_migration(const char *host_port)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment