summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libvncclient/vncviewer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 498f14a..752f0a7 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -316,6 +316,8 @@ void rfbClientCleanup(rfbClient* client) {
#endif
#endif
+ if (client->sock > 0)
+ close(client->sock);
free(client->desktopName);
free(client->serverHost);
free(client);