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