From 4b28667e90cff336ea39c085f74075ff21c25eff Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Tue, 17 Aug 2021 13:13:51 +0300 Subject: [PATCH] Fix possible missing clipboard deinit --- common/rfb/VNCServerST.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/rfb/VNCServerST.cxx b/common/rfb/VNCServerST.cxx index fd13cf3..a564021 100644 --- a/common/rfb/VNCServerST.cxx +++ b/common/rfb/VNCServerST.cxx @@ -273,6 +273,11 @@ void VNCServerST::removeSocket(network::Socket* sock) { std::list::iterator ci; for (ci = clients.begin(); ci != clients.end(); ci++) { if ((*ci)->getSock() == sock) { + + if (clipboardClient == *ci) + handleClipboardAnnounce(*ci, false); + clipboardRequestors.remove(*ci); + // - Delete the per-Socket resources delete *ci;