[PATCH 11/11] worker: remove assertion on alloc_drawable

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

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>

There is no guarantee in the code that this can't be hit, so we should
cope with it (the condition can be reached easily by running the server
without waiting for blocked clients or pipe size)

The following commit will attempt to address this.
---
 server/red_worker.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 0542b29..ca7e8bf 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -3300,7 +3300,8 @@ static void free_one_drawable(RedWorker *worker, int force_glz_free)
     Drawable *drawable;
     Container *container;
 
-    spice_assert(ring_item);
+    if (!ring_item)
+        return;
     drawable = SPICE_CONTAINEROF(ring_item, Drawable, list_link);
     if (force_glz_free) {
         RingItem *glz_item, *next_item;
-- 
2.4.3

_______________________________________________
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]