From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOnGT-0000ND-Tq for qemu-devel@nongnu.org; Thu, 18 Oct 2012 06:23:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOnGM-0001mT-UI for qemu-devel@nongnu.org; Thu, 18 Oct 2012 06:23:45 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:62641) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOnGM-0001aH-OZ for qemu-devel@nongnu.org; Thu, 18 Oct 2012 06:23:38 -0400 Received: by mail-pa0-f45.google.com with SMTP id fb10so8234740pad.4 for ; Thu, 18 Oct 2012 03:23:38 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 18 Oct 2012 12:22:35 +0200 Message-Id: <1350555758-29988-10-git-send-email-pbonzini@redhat.com> In-Reply-To: <1350555758-29988-1-git-send-email-pbonzini@redhat.com> References: <1350555758-29988-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 09/12] migration: close socket QEMUFile from socket_close List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: quintela@redhat.com The common suffix now is process_incoming_migration+qemu_fclose. Signed-off-by: Paolo Bonzini --- migration-tcp.c | 2 ++ migration-unix.c | 2 ++ savevm.c | 1 + 3 file modificati, 5 inserzioni(+) diff --git a/migration-tcp.c b/migration-tcp.c index 07715de..463f7f6 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@ -111,6 +111,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 def1969..46e04fc 100644 --- a/migration-unix.c +++ b/migration-unix.c @@ -144,6 +144,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 7eca28b..ae5e617 100644 --- a/savevm.c +++ b/savevm.c @@ -212,6 +212,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; } -- 1.7.12.1