diff options
Diffstat (limited to 'unix/xserver/hw/vnc/vncExtInit.cc')
-rw-r--r-- | unix/xserver/hw/vnc/vncExtInit.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc index 4c1fdd4d..0292a6d1 100644 --- a/unix/xserver/hw/vnc/vncExtInit.cc +++ b/unix/xserver/hw/vnc/vncExtInit.cc @@ -348,14 +348,13 @@ int vncConnectClient(const char *addr) return 0; } - char *host; + std::string host; int port; getHostAndPort(addr, &host, &port, 5500); try { - network::Socket* sock = new network::TcpSocket(host, port); - delete [] host; + network::Socket* sock = new network::TcpSocket(host.c_str(), port); desktop[0]->addClient(sock, true); } catch (rdr::Exception& e) { vlog.error("Reverse connection: %s",e.str()); |