aboutsummaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/RFBGlue.cc
diff options
context:
space:
mode:
Diffstat (limited to 'unix/xserver/hw/vnc/RFBGlue.cc')
-rw-r--r--unix/xserver/hw/vnc/RFBGlue.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/unix/xserver/hw/vnc/RFBGlue.cc b/unix/xserver/hw/vnc/RFBGlue.cc
index a1507924..9a014f17 100644
--- a/unix/xserver/hw/vnc/RFBGlue.cc
+++ b/unix/xserver/hw/vnc/RFBGlue.cc
@@ -190,9 +190,12 @@ int vncIsTCPPortUsed(int port)
{
try {
// Attempt to create TCPListeners on that port.
- // They go out of scope immediately and are destroyed.
- std::list<network::TcpListener> dummy;
+ std::list<network::TcpListener*> dummy;
network::createTcpListeners (&dummy, 0, port);
+ while (!dummy.empty()) {
+ delete dummy.back();
+ dummy.pop_back();
+ }
} catch (rdr::Exception& e) {
return 1;
}