summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-01-17 17:37:59 +0200
committerAlon Levy <alevy@redhat.com>2012-01-22 15:13:32 +0200
commit88f68f5329fc1107107c3a81c7fc0b7f7063ae25 (patch)
treea025dc4272e6dab2aa73155a6199eccea73642ec /server
parent7dbdd93bf97436dd523721a090aaea63fd0a8b3b (diff)
downloadspice-88f68f5329fc1107107c3a81c7fc0b7f7063ae25.tar.gz
spice-88f68f5329fc1107107c3a81c7fc0b7f7063ae25.tar.xz
spice-88f68f5329fc1107107c3a81c7fc0b7f7063ae25.zip
server/red_channel: avoid segfault if stream == NULL
Diffstat (limited to 'server')
-rw-r--r--server/red_channel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c
index e526179e..d2c9e6d8 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -162,6 +162,10 @@ static void red_peer_handle_incoming(RedsStream *stream, IncomingHandler *handle
uint16_t msg_type;
uint32_t msg_size;
+ if (!stream) {
+ return;
+ }
+
for (;;) {
int ret_handle;
if (handler->header_pos < handler->header.header_size) {