[Spice-devel] [PATCH xf86-video-qxl] spiceqxl_main_loop: fix use of watch after removal

Alon Levy alevy at redhat.com
Thu May 30 14:12:28 PDT 2013


rhbz 968931

Signed-off-by: Alon Levy <alevy at redhat.com>
---
 src/spiceqxl_main_loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spiceqxl_main_loop.c b/src/spiceqxl_main_loop.c
index a8a67de..92579eb 100644
--- a/src/spiceqxl_main_loop.c
+++ b/src/spiceqxl_main_loop.c
@@ -299,7 +299,7 @@ static void select_and_check_watches(void)
     if (retval) {
         RING_FOREACH_SAFE(link, next, &watches) {
             watch = (SpiceWatch*)link;
-            if ((watch->event_mask & SPICE_WATCH_EVENT_READ)
+            if (!watch->remove && (watch->event_mask & SPICE_WATCH_EVENT_READ)
                  && FD_ISSET(watch->fd, &rfds)) {
                 watch->func(watch->fd, SPICE_WATCH_EVENT_READ, watch->opaque);
             }
-- 
1.8.2.1



More information about the Spice-devel mailing list