summaryrefslogtreecommitdiffstats
path: root/libvncclient/vncviewer.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvncclient/vncviewer.c')
-rw-r--r--libvncclient/vncviewer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c
index 8b09d87..3b16a6f 100644
--- a/libvncclient/vncviewer.c
+++ b/libvncclient/vncviewer.c
@@ -372,6 +372,12 @@ void rfbClientCleanup(rfbClient* client) {
FreeTLS(client);
+ while (client->clientData) {
+ rfbClientData* next = client->clientData->next;
+ free(client->clientData);
+ client->clientData = next;
+ }
+
if (client->sock >= 0)
close(client->sock);
if (client->listenSock >= 0)