summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2010-03-21 15:36:49 +0200
committerUri Lublin <uril@redhat.com>2010-03-23 15:55:24 +0200
commitaf57e21860ae2ad04a5ea4c551f843adceb609bf (patch)
tree7c8c200e83b76b68e4e944be4093660f0f883df1
parentced3dd76352a84f6b6621218820d37530aab43b3 (diff)
server: fix wrong access to ring item, #575556spice-server-0.4.2-7.el6
-rw-r--r--server/red_worker.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 2b7416d7..14951526 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1266,6 +1266,11 @@ static void red_pipe_clear_device_resources(RedChannel *channel)
channel->pipe_size--;
break;
}
+
+ if (!item) {
+ // the released item was the head of the pipe
+ item = (PipeItem *)ring;
+ }
}
}