Address #12 ClientData does not get freed

rfbClientSetClientData() allocates a new rfbClientData, but never gets
cleaned up, which causes memory leaks.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
pull/1/head
Robbert Klarenbeek 11 years ago committed by Johannes Schindelin
parent bd811bdee9
commit f2a93afb46

@ -372,6 +372,12 @@ void rfbClientCleanup(rfbClient* client) {
FreeTLS(client); FreeTLS(client);
while (client->clientData) {
rfbClientData* next = client->clientData->next;
free(client->clientData);
client->clientData = next;
}
if (client->sock >= 0) if (client->sock >= 0)
close(client->sock); close(client->sock);
if (client->listenSock >= 0) if (client->listenSock >= 0)

Loading…
Cancel
Save