You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libvncserver/0001-Fix-crash-in-krfb.patch

37 lines
1.2 KiB

From afd1d329ed117f6e4d8c46eba362b7d5c51184ac Mon Sep 17 00:00:00 2001
From: Amandeep Singh <aman.dedman@gmail.com>
Date: Wed, 9 Oct 2013 04:12:08 +0530
Subject: [PATCH 1/2] Fix crash in krfb
Krfb crashes on quit, if any client is connected
due to a rfbClientConnectionGone call missing
---
libvncserver/main.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/libvncserver/main.c b/libvncserver/main.c
index 4cb18ac..b8cdde1 100644
--- a/libvncserver/main.c
+++ b/libvncserver/main.c
@@ -1061,10 +1061,13 @@ void rfbShutdownServer(rfbScreenInfoPtr screen,rfbBool disconnectClients) {
if(disconnectClients) {
rfbClientPtr cl;
rfbClientIteratorPtr iter = rfbGetClientIterator(screen);
- while( (cl = rfbClientIteratorNext(iter)) )
- if (cl->sock > -1)
- /* we don't care about maxfd here, because the server goes away */
- rfbCloseClient(cl);
+ while( (cl = rfbClientIteratorNext(iter)) ) {
+ if (cl->sock > -1) {
+ /* we don't care about maxfd here, because the server goes away */
+ rfbCloseClient(cl);
+ rfbClientConnectionGone(cl);
+ }
+ }
rfbReleaseClientIterator(iter);
}
--
1.9.3