[Spice-devel] [PATCH 2/2] server/red_channel: fix segfault on red_channel_destroy if peer already removed
Alon Levy
alevy at redhat.com
Sat Jan 15 10:57:55 PST 2011
---
server/red_channel.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/server/red_channel.c b/server/red_channel.c
index 40f3a1f..a13ef0e 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -365,7 +365,7 @@ void red_channel_destroy(RedChannel *channel)
void red_channel_shutdown(RedChannel *channel)
{
red_printf("");
- if (!channel->peer->shutdown) {
+ if (channel->peer && !channel->peer->shutdown) {
channel->core->watch_update_mask(channel->peer->watch,
SPICE_WATCH_EVENT_READ);
red_channel_pipe_clear(channel);
--
1.7.3.4
More information about the Spice-devel
mailing list