From: Tim Hardeck <thardeck@suse.de>
To: qemu-devel@nongnu.org
Cc: Tim Hardeck <thardeck@suse.de>
Subject: [Qemu-devel] [PATCH 1/2] vnc: fix segfault due to failed handshake
Date: Sun, 14 Oct 2012 15:08:47 +0200 [thread overview]
Message-ID: <1350220128-10140-2-git-send-email-thardeck@suse.de> (raw)
In-Reply-To: <1350220128-10140-1-git-send-email-thardeck@suse.de>
When the VNC server disconnects due to a failed handshake we don't have
vs->bh allocated yet.
Check for this case and don't delete it.
Signed-off-by: Tim Hardeck <thardeck@suse.de>
---
ui/vnc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/vnc.c b/ui/vnc.c
index 01b2daf..656895a 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1055,7 +1055,9 @@ static void vnc_disconnect_finish(VncState *vs)
vnc_unlock_output(vs);
qemu_mutex_destroy(&vs->output_mutex);
- qemu_bh_delete(vs->bh);
+ if (vs->bh != NULL) {
+ qemu_bh_delete(vs->bh);
+ }
buffer_free(&vs->jobs_buffer);
for (i = 0; i < VNC_STAT_ROWS; ++i) {
--
1.7.10.4
next prev parent reply other threads:[~2012-10-14 13:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-14 13:08 [Qemu-devel] [PATCH 0/2] fix segfaults triggered by failed vnc handshakes Tim Hardeck
2012-10-14 13:08 ` Tim Hardeck [this message]
2012-10-17 12:52 ` [Qemu-devel] [PATCH 1/2] vnc: fix segfault due to failed handshake Andreas Färber
2012-10-14 13:08 ` [Qemu-devel] [PATCH 2/2] qemu queue: fix uninitialized removals Tim Hardeck
2012-10-17 15:00 ` Andreas Färber
2012-10-17 21:24 ` Tim Hardeck
2012-10-18 10:43 ` Kevin Wolf
2012-10-18 13:24 ` Andreas Färber
2012-10-18 13:32 ` Peter Maydell
2012-10-18 13:48 ` Peter Maydell
-- strict thread matches above, loose matches on Subject: below --
2012-10-09 15:21 [Qemu-devel] [PATCH 0/2] fix segfaults triggered by failed vnc handshakes Tim Hardeck
2012-10-09 15:21 ` [Qemu-devel] [PATCH 1/2] vnc: fix segfault due to failed handshake Tim Hardeck
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=1350220128-10140-2-git-send-email-thardeck@suse.de \
--to=thardeck@suse.de \
--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).