summaryrefslogtreecommitdiffstats
path: root/server/red_worker.c
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-05-20 13:27:31 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-05-21 09:08:50 +0300
commit038ae54b1c4c43a63d346bdfe2db52b48f20a22e (patch)
tree5ebaecb5475850a35154e7551ed7f7c3b3003c2d /server/red_worker.c
parent1b9162b5cfe4043df851e8ecaa503b8261ba5868 (diff)
downloadspice-038ae54b1c4c43a63d346bdfe2db52b48f20a22e.tar.gz
spice-038ae54b1c4c43a63d346bdfe2db52b48f20a22e.tar.xz
spice-038ae54b1c4c43a63d346bdfe2db52b48f20a22e.zip
server: handle red_channel_client_create returning NULL
Diffstat (limited to 'server/red_worker.c')
-rw-r--r--server/red_worker.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 3a0bdf4e..9e5624ba 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -9773,6 +9773,9 @@ static CommonChannelClient *common_channel_client_create(int size,
RedChannelClient *rcc =
red_channel_client_create(size, &common->base, client, stream,
num_common_caps, common_caps, num_caps, caps);
+ if (!rcc) {
+ return NULL;
+ }
CommonChannelClient *common_cc = (CommonChannelClient*)rcc;
common_cc->worker = common->worker;
common_cc->id = common->worker->id;