diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2008-08-20 06:22:28 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2008-08-20 06:22:28 +0000 |
commit | 7bdccd7002fdf82ef9c4b94df132c5ea903e4348 (patch) | |
tree | cd4143f0317ace2dec0c34676db033a5862d3abd /unix/x0vncserver | |
parent | 5120e5e264ab76a0e62859df2445973dbb22f5ac (diff) | |
download | tigervnc-7bdccd7002fdf82ef9c4b94df132c5ea903e4348.tar.gz tigervnc-7bdccd7002fdf82ef9c4b94df132c5ea903e4348.zip |
Fixed a few more memory leaks.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2680 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/x0vncserver')
-rw-r--r-- | unix/x0vncserver/x0vncserver.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx index baf9fcce..a6bae95b 100644 --- a/unix/x0vncserver/x0vncserver.cxx +++ b/unix/x0vncserver/x0vncserver.cxx @@ -423,8 +423,9 @@ int main(int argc, char** argv) CharArray dpyStr(displayname.getData()); if (!(dpy = XOpenDisplay(dpyStr.buf[0] ? dpyStr.buf : 0))) { + // FIXME: Why not vlog.error(...)? fprintf(stderr,"%s: unable to open display \"%s\"\r\n", - programName, XDisplayName(displayname.getData())); + programName, XDisplayName(dpyStr.buf)); exit(1); } @@ -450,9 +451,11 @@ int main(int argc, char** argv) TcpListener listener((int)rfbport); vlog.info("Listening on port %d", (int)rfbport); - FileTcpFilter fileTcpFilter(hostsFile.getData()); - if (strlen(hostsFile.getData()) != 0) + const char *hostsData = hostsFile.getData(); + FileTcpFilter fileTcpFilter(hostsData); + if (strlen(hostsData) != 0) listener.setFilter(&fileTcpFilter); + delete[] hostsData; PollingScheduler sched((int)pollingCycle, (int)maxProcessorUsage); |