nanohttp leaks memory handling MIME attachments
Status: Beta
Brought to you by:
snowdrop
In the latest release (version 1.1.0) and in CVS, there is a memory leak in nanohttp/nanohttp-request.c when the request contains a MIME attachment. In hrequest_new_from_socket(), req->in is set by http_input_stream_new() which allocates memory. Later on in the function req->in is set by http_input_stream_new_from_file() without free()'ing the contents of req->in first. I've attached a patch.
patch to fix memory leak