migration: close socket QEMUFile from socket_close

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>
This commit is contained in:
Paolo Bonzini 2012-08-07 10:50:26 +02:00
parent 6c3601361f
commit ab52a824a4
3 changed files with 5 additions and 0 deletions

View File

@ -103,6 +103,8 @@ static void tcp_accept_incoming_migration(void *opaque)
process_incoming_migration(f);
qemu_fclose(f);
return;
out:
closesocket(c);
}

View File

@ -103,6 +103,8 @@ static void unix_accept_incoming_migration(void *opaque)
process_incoming_migration(f);
qemu_fclose(f);
return;
out:
close(c);
}

View File

@ -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;
}