summaryrefslogtreecommitdiffstats
path: root/libvncserver/tight.c
diff options
context:
space:
mode:
authorBenjamin Dürholt <b.duerholt@portunity.de>2015-04-10 12:16:15 +0200
committerBenjamin Dürholt <b.duerholt@portunity.de>2015-04-10 12:16:15 +0200
commit4c1bd4e76e0cdbb61b38e31d408fff86a3203433 (patch)
tree173d2bd3fe9879e081d4669fb4496c30543f924c /libvncserver/tight.c
parent344264da2facfd2ffba4e2f567be6d2c14b6d63b (diff)
downloadlibtdevnc-4c1bd4e76e0cdbb61b38e31d408fff86a3203433.tar.gz
libtdevnc-4c1bd4e76e0cdbb61b38e31d408fff86a3203433.zip
prevent segfault
Diffstat (limited to 'libvncserver/tight.c')
-rw-r--r--libvncserver/tight.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libvncserver/tight.c b/libvncserver/tight.c
index 276a2e3..8eb7380 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;
+ }
}