Awesome. All leaks are now gone! Thank you Nicolas.
mode at:
https://www.gnu.org/software/libmicrohttpd/
> > If I understand your code, you use MHD_create_response_from_buffer
> with the MHD_RESPMEM_PERSISTENT mode, which, according to the
> documentation [1], means that 'reply' should be static/global, which isn't.
>
> You can either:
> - use MHD_RESPMEM_MUST_FREE and let MHD free 'reply' after use
Hello Gavin,
[resend to the list, sorry fot the noise Gavin]
Le 2022-01-17 à 14 h 40, Gavin Henry a écrit :> Hi all,
>
> I'm using json_dumps from jansson in my MHD_create_response_from_buffer
>
> Where is the best place to free this? I've tried at the end of my
responses:
>
> MHD_destroy_resp
Hi all,
I'm using json_dumps from jansson in my MHD_create_response_from_buffer
Where is the best place to free this? I've tried at the end of my responses:
MHD_destroy_response(response);
free(json_reply)
return ret;
but this obviously breaks the data that goes to the client:
https://github.c