Commit f2a93afb authored by Robbert Klarenbeek's avatar Robbert Klarenbeek Committed by Johannes Schindelin

Address #12 ClientData does not get freed

rfbClientSetClientData() allocates a new rfbClientData, but never gets
cleaned up, which causes memory leaks.
Signed-off-by: 's avatarJohannes Schindelin <johannes.schindelin@gmx.de>
parent bd811bde
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment