Patchwork [07/11] ui/spice-core: fix segfault in monitor

login
register
mail settings
Submitter Gerd Hoffmann
Date Oct. 25, 2011, 12:25 p.m.
Message ID <1319545550-24203-8-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/121676/
State New
Headers show

Comments

Gerd Hoffmann - Oct. 25, 2011, 12:25 p.m.
From: Alon Levy <alevy@redhat.com>

Fix segfault if a qxl device is present but no spice command line
argument is given.

RHBZ 743251.

Signed-off-by: Alon Levy <alevy@redhat.com>
---
 ui/spice-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/ui/spice-core.c b/ui/spice-core.c
index 4c06c36..be52356 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -445,7 +445,7 @@  void do_info_spice(Monitor *mon, QObject **ret_data)
     int port, tls_port;
     char version_string[20]; /* 12 = |255.255.255\0| is the max */
 
-    if (!spice_server) {
+    if (!spice_server || !opts) {
         *ret_data = qobject_from_jsonf("{ 'enabled': false }");
         return;
     }