[Spice-devel] [PATCH] fix spice-server segfault on migration

Gerd Hoffmann kraxel at redhat.com
Tue Feb 15 01:39:09 PST 2011


spice-server tries to use the migration information without checking
whenever this is available in the first place ...

Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 server/reds.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/server/reds.c b/server/reds.c
index ba6f552..33a23b6 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2896,6 +2896,10 @@ static void reds_mig_switch(void)
     SpiceMsgMainMigrationSwitchHost migrate;
     RedsOutItem *item;
 
+    if (s == NULL) {
+        return;
+    }
+
     red_printf("");
     item = new_out_item(SPICE_MSG_MAIN_MIGRATE_SWITCH_HOST);
 
-- 
1.7.1



More information about the Spice-devel mailing list