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>
pull/1/head
George Kiagiadakis 14 years ago committed by Johannes Schindelin
parent 35246edddd
commit c1363fa958

@ -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;
} }

Loading…
Cancel
Save