From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6616] monitor: Don't change VNC server when disabled (Jan Kiszka)
Date: Wed, 11 Feb 2009 21:00:39 +0000 [thread overview]
Message-ID: <E1LXMCF-000715-0R@cvs.savannah.gnu.org> (raw)
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;
reply other threads:[~2009-02-11 21:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1LXMCF-000715-0R@cvs.savannah.gnu.org \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).