Commit c1363fa9 authored by George Kiagiadakis's avatar George Kiagiadakis Committed by Johannes Schindelin

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: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent 35246edd
...@@ -134,11 +134,13 @@ void rfbTightCleanup(rfbScreenInfoPtr screen) ...@@ -134,11 +134,13 @@ void rfbTightCleanup(rfbScreenInfoPtr screen)
{ {
if(tightBeforeBufSize) { if(tightBeforeBufSize) {
free(tightBeforeBuf); free(tightBeforeBuf);
tightBeforeBuf = NULL;
tightBeforeBufSize=0; tightBeforeBufSize=0;
tightBeforeBuf = NULL; tightBeforeBuf = NULL;
} }
if(tightAfterBufSize) { if(tightAfterBufSize) {
free(tightAfterBuf); free(tightAfterBuf);
tightAfterBuf = NULL;
tightAfterBufSize=0; tightAfterBufSize=0;
tightAfterBuf = NULL; tightAfterBuf = NULL;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment