summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <kiagiadakis.george@gmail.com>2010-11-10 18:57:23 +0000
committerJohannes Schindelin <johannes.schindelin@gmx.de>2011-04-28 14:23:09 +0200
commitc1363fa9583ed41b94fbc79b3ff410b7d5189407 (patch)
tree0bd56045680d90f00d704a2854d404e5b72621cf
parent35246edddd952a6d83511f69cba47536495e4700 (diff)
downloadlibtdevnc-c1363fa9583ed41b94fbc79b3ff410b7d5189407.tar.gz
libtdevnc-c1363fa9583ed41b94fbc79b3ff410b7d5189407.zip
Fix memory corruption bug.
This bug occured when a second telepathy tubes client was connected after the first one had disconnected and the channel (thus, the screen too) had been destroyed. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r--libvncserver/tight.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libvncserver/tight.c b/libvncserver/tight.c
index bb033c3..5bbab26 100644
--- a/libvncserver/tight.c
+++ b/libvncserver/tight.c
@@ -134,11 +134,13 @@ void rfbTightCleanup(rfbScreenInfoPtr screen)
{
if(tightBeforeBufSize) {
free(tightBeforeBuf);
+ tightBeforeBuf = NULL;
tightBeforeBufSize=0;
tightBeforeBuf = NULL;
}
if(tightAfterBufSize) {
free(tightAfterBuf);
+ tightAfterBuf = NULL;
tightAfterBufSize=0;
tightAfterBuf = NULL;
}