Received: from eggs.gnu.org ([140.186.70.92]:38903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgZb-0002WT-Iq for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:57:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIgNd-0004LK-G3 for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:45:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30736) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIgNd-0004L9-91 for qemu-devel@nongnu.org; Tue, 25 Oct 2011 08:45:21 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9PCjK95016368 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Oct 2011 08:45:20 -0400 From: Gerd Hoffmann Date: Tue, 25 Oct 2011 14:25:50 +0200 Message-Id: <1319545550-24203-12-git-send-email-kraxel@redhat.com> In-Reply-To: <1319545550-24203-1-git-send-email-kraxel@redhat.com> References: <1319545550-24203-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 11/11] spice: fix file handle cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Setting both read and write handlers to NULL in qemu_set_fd_handler is not enougth to make qemu purge the file handle from the list. We must set opaque to NULL too. Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index be52356..6d3dab6 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -133,7 +133,7 @@ static SpiceWatch *watch_add(int fd, int event_mask, SpiceWatchFunc func, void * static void watch_remove(SpiceWatch *watch) { - watch_update_mask(watch, 0); + qemu_set_fd_handler(watch->fd, NULL, NULL, NULL); QTAILQ_REMOVE(&watches, watch, next); g_free(watch); } -- 1.7.1