summaryrefslogtreecommitdiffstats
path: root/libvncserver/tight.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncserver/tight.c')
-rw-r--r--libvncserver/tight.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libvncserver/tight.c b/libvncserver/tight.c
index 276a2e3..bca374d 100644
--- a/libvncserver/tight.c
+++ b/libvncserver/tight.c
@@ -163,7 +163,11 @@ void rfbTightCleanup (rfbScreenInfoPtr screen)
tightAfterBufSize = 0;
tightAfterBuf = NULL;
}
- if (j) tjDestroy(j);
+ if (j) {
+ tjDestroy(j);
+ /* Set freed resource handle to 0! */
+ j = 0;
+ }
}
@@ -559,7 +563,7 @@ ExtendSolidArea(rfbClientPtr cl,
/*
* Check if a rectangle is all of the same color. If needSameColor is
* set to non-zero, then also check that its color equals to the
- * *colorPtr value. The result is 1 if the test is successfull, and in
+ * *colorPtr value. The result is 1 if the test is successful, and in
* that case new color will be stored in *colorPtr.
*/