Skip to content

Commit

Permalink
libvncclient: free vncRec memory in rfbClientCleanup()
Browse files Browse the repository at this point in the history
Otherwise we leak memory. Spotted by Ramin Farajpour Cami
<ramin.blackhat@gmail.com>, thanks!
  • Loading branch information
bk138 committed Nov 21, 2020
1 parent 4bef2a0 commit bef41f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libvncclient/vncviewer.c
Expand Up @@ -534,6 +534,8 @@ void rfbClientCleanup(rfbClient* client) {
client->clientData = next;
}

free(client->vncRec);

if (client->sock != RFB_INVALID_SOCKET)
rfbCloseSocket(client->sock);
if (client->listenSock != RFB_INVALID_SOCKET)
Expand Down

0 comments on commit bef41f6

Please sign in to comment.