[Libwebsockets] Memory leak after serving http request

bjorka adinov adinov.bjorka at gmail.com
Mon May 12 08:15:34 CEST 2014


Hello Andy,

I have a bit of problem here, hope you can spare some time to look into it.
Any helps are greatly appreciated.

I'm using libwebsockets 1.23, I'm making a server application using
Microsoft Visual Studio 2008, using MFC.

Most of the time when I close my application after serving simple http page
(just html, no websocket), visual studio reports some memory leaks. I ran
visual detector and the source of the leak is in parsers.c line 60,
function lws_allocate_header_table.

wsi->u.hdr.ah = malloc(sizeof(*wsi->u.hdr.ah));

As far as I know, the memory should be released within
function libwebsocket_close_and_free_session inside libwebsockets.c but
somehow it escaped the deletion.

Thanks alot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20140512/2c3e0d88/attachment.html>


More information about the Libwebsockets mailing list