[Spice-devel] [PATCH v2 3/3] server/red_worker: release bad drawables

Alon Levy alevy at redhat.com
Sun Jul 22 01:39:23 PDT 2012


---
 server/red_worker.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 1fe9ada..aca998b 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -4844,11 +4844,10 @@ static int red_process_commands(RedWorker *worker, uint32_t max_pipe_size, int *
         case QXL_CMD_DRAW: {
             RedDrawable *red_drawable = red_drawable_new(); // returns with 1 ref
 
-            if (red_get_drawable(&worker->mem_slots, ext_cmd.group_id,
+            if (!red_get_drawable(&worker->mem_slots, ext_cmd.group_id,
                                  red_drawable, ext_cmd.cmd.data, ext_cmd.flags)) {
-                break;
+                red_process_drawable(worker, red_drawable, ext_cmd.group_id);
             }
-            red_process_drawable(worker, red_drawable, ext_cmd.group_id);
             // release the red_drawable
             put_red_drawable(worker, red_drawable, ext_cmd.group_id);
             break;
-- 
1.7.10.1



More information about the Spice-devel mailing list