[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [6616] monitor: Don't change VNC server when disabled (Jan
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [6616] monitor: Don't change VNC server when disabled (Jan Kiszka) |
Date: |
Wed, 11 Feb 2009 21:00:39 +0000 |
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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [6616] monitor: Don't change VNC server when disabled (Jan Kiszka),
Anthony Liguori <=