LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.11k stars 484 forks source link

Memory leak in rfbClientConnectionGone when using websockets #571

Closed JorisHansMeijer closed 1 year ago

JorisHansMeijer commented 1 year ago

When using websockets the wsctx context is not freed after a disconnect.

To solve this, in rfbserver.c add to rfbClientConnectionGone:

if (cl->wsctx != NULL) { free(cl->wsctx); cl->wsctx = NULL; }

bk138 commented 1 year ago

Thanks for finding out! Could you be so kind and file a pull request? This way, we can also have proper author credits :-)

JorisHansMeijer commented 1 year ago

Done