[Spice-devel] [PATCH v2 06/40] server/red_worker: don't push to NULL channel (called from device input)

Alon Levy alevy at redhat.com
Wed Mar 2 00:31:29 PST 2011


---
 server/red_worker.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 57d67c1..a8c0551 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8352,13 +8352,16 @@ static void display_channel_send_item(RedChannel *base, PipeItem *pipe_item)
     default:
         red_error("invalid pipe item type");
     }
-    red_unref_channel((RedChannel *)display_channel);
+    red_unref_channel(&display_channel->common.base);
 }
 
 void red_channel_push(RedChannel *channel)
 {
     PipeItem *pipe_item;
 
+    if (!channel) {
+        return;
+    }
     if (!channel->during_send) {
         channel->during_send = TRUE;
     } else {
-- 
1.7.4.1



More information about the Spice-devel mailing list