From c1363fa9583ed41b94fbc79b3ff410b7d5189407 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Wed, 10 Nov 2010 18:57:23 +0000 Subject: 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 --- libvncserver/tight.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.1