[sr-dev] [kamailio/kamailio] http_async_client: memory mismanagement (#1407)

Federico Cabiddu notifications at github.com
Wed Jan 24 08:13:07 CET 2018


set_quey_params is called in mod_init by init_query_params (https://github.com/kamailio/kamailio/blob/master/src/modules/http_async_client/async_http.c#L631), so whenever ah_set_req is called the query_params struct should already have been initialized.

headers.t is a double pointer, the allocated memory is freed later by free_async_query, we are not freeing it inset_query_params. If we don't set it to NULL we end up with a growing headers list (from different request) and we go toward a crash being the memory freed elsewhere.

This being said, do you have a coredump of the crashes? Which OS/libcurl version are you using? Recently a crash at startup had been reported which was due to a combination of libcurl/OS libs: https://github.com/kamailio/kamailio/issues/1391.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1407#issuecomment-360041430
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20180124/b86e44bb/attachment.html>


More information about the sr-dev mailing list