qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [6616] monitor: Don't change VNC server when disabled (Jan Kiszka)
@ 2009-02-11 21:00 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2009-02-11 21:00 UTC (permalink / raw)
  To: qemu-devel

Revision: 6616
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6616
Author:   aliguori
Date:     2009-02-11 21:00:38 +0000 (Wed, 11 Feb 2009)

Log Message:
-----------
monitor: Don't change VNC server when disabled (Jan Kiszka)

[ As requested, broken out of the monitor rework series. ]

Avoid a segfault when the user issues 'change vnc' without having vnc
enabled on startup.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/vnc.c

Modified: trunk/vnc.c
===================================================================
--- trunk/vnc.c	2009-02-11 21:00:32 UTC (rev 6615)
+++ trunk/vnc.c	2009-02-11 21:00:38 UTC (rev 6616)
@@ -2333,6 +2333,8 @@
 {
     VncState *vs = ds ? (VncState *)ds->opaque : vnc_state;
 
+    if (!vs)
+        return;
     if (vs->display) {
 	qemu_free(vs->display);
 	vs->display = NULL;
@@ -2392,6 +2394,8 @@
     int tls = 0, x509 = 0;
 #endif
 
+    if (!vnc_state)
+        return -1;
     vnc_display_close(ds);
     if (strcmp(display, "none") == 0)
 	return 0;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-02-11 21:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 21:00 [Qemu-devel] [6616] monitor: Don't change VNC server when disabled (Jan Kiszka) Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).