summaryrefslogtreecommitdiffstats
path: root/server/red_channel.c
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2013-04-30 14:56:35 -0400
committerYonit Halperin <yhalperi@redhat.com>2013-04-30 14:56:35 -0400
commitf0f8d7dd523b1a30bac7d68fad0d275c5b3805ee (patch)
treec8a794e67f2653ea1789cd4ecd02cd389c5584e6 /server/red_channel.c
parentf7f876a3cbf5f581f76e66e0972e75e11610e509 (diff)
downloadspice-f0f8d7dd523b1a30bac7d68fad0d275c5b3805ee.tar.gz
spice-f0f8d7dd523b1a30bac7d68fad0d275c5b3805ee.tar.xz
spice-f0f8d7dd523b1a30bac7d68fad0d275c5b3805ee.zip
red_channel: fix not handling self pipe items in red_channel_client_release_item
When a client disconnects, red_channel_client_pipe_clear is called. Releasing pipe items of type == MIGRATE||EMPTY_MSG||PING wasn't handled, and was passed to channel_cbs.release_item. There, an error occured since the pipe items were not recognized.
Diffstat (limited to 'server/red_channel.c')
-rw-r--r--server/red_channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index b1a6d57c..90477626 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -576,6 +576,9 @@ static void red_channel_client_release_item(RedChannelClient *rcc, PipeItem *ite
switch (item->type) {
case PIPE_ITEM_TYPE_SET_ACK:
+ case PIPE_ITEM_TYPE_EMPTY_MSG:
+ case PIPE_ITEM_TYPE_MIGRATE:
+ case PIPE_ITEM_TYPE_PING:
free(item);
break;
default: