From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFnUu-0006My-Pg for qemu-devel@nongnu.org; Sun, 23 Sep 2012 10:49:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TFnUt-0002xr-Nw for qemu-devel@nongnu.org; Sun, 23 Sep 2012 10:49:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TFnUt-0002xm-Fn for qemu-devel@nongnu.org; Sun, 23 Sep 2012 10:49:27 -0400 From: Orit Wasserman Date: Sun, 23 Sep 2012 16:49:07 +0200 Message-Id: <1348411747-29804-5-git-send-email-owasserm@redhat.com> In-Reply-To: <1348411747-29804-1-git-send-email-owasserm@redhat.com> References: <1348411747-29804-1-git-send-email-owasserm@redhat.com> Subject: [Qemu-devel] [PATCH v4 4/4] Clear handler only for valid fd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, armbru@redhat.com, mst@redhat.com, mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com, Orit Wasserman , pbonzini@redhat.com, akong@redhat.com Signed-off-by: Orit Wasserman --- migration.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/migration.c b/migration.c index 1edeec5..c20a2fe 100644 --- a/migration.c +++ b/migration.c @@ -240,8 +240,6 @@ static int migrate_fd_cleanup(MigrationState *s) { int ret = 0; - qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); - if (s->file) { DPRINTF("closing file\n"); ret = qemu_fclose(s->file); @@ -249,6 +247,7 @@ static int migrate_fd_cleanup(MigrationState *s) } if (s->fd != -1) { + qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL); close(s->fd); s->fd = -1; } -- 1.7.7.6