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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



rhbz 968931

Signed-off-by: Alon Levy <alevy@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]