[Spice-devel] [PATCH 22/23] server/red_channel: red_channel_pipe_clear: assert on NULL channel

Alon Levy alevy at redhat.com
Mon Feb 7 09:31:24 PST 2011


---
 server/red_channel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/server/red_channel.c b/server/red_channel.c
index 205eaf9..a51359a 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -603,10 +603,11 @@ int red_channel_is_connected(RedChannel *channel)
 void red_channel_pipe_clear(RedChannel *channel)
 {
     PipeItem *item;
+
+    ASSERT(channel);
     if (channel->send_data.item) {
         channel->release_item(channel, channel->send_data.item, TRUE);
     }
-
     while ((item = (PipeItem *)ring_get_head(&channel->pipe))) {
         ring_remove(&item->link);
         channel->release_item(channel, item, FALSE);
-- 
1.7.4



More information about the Spice-devel mailing list