[sr-dev] [kamailio/kamailio] http_async_client frees pointer twice(Kamailio 5.0.4) (#1340)

Daniel-Constantin Mierla notifications at github.com
Thu Dec 21 16:37:44 CET 2017


@linuxmaniac - that is not solving it, setting ptr to NULL is effective only inside the curl_shm_free().

To me it looks like some pointers that are given to a CURL function, which is going to free them at some point, are also freed inside http_async_client module. Not that familiar with the code, but I think some of the `shm_free(`) inside `set_query_params()` should not be done. I guess that the fix is in the direction of: when a field from `struct query_params` is given to a CURL function, it should be set to `NULL` so `set_query_params()` doesn't free it again. Now, identifying when the field is given to a CURL function requires to look deeper a the code of the module, not being familiar with, I couldn't do it quickly and no much spare time here at this moment.

-- 
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/issues/1340#issuecomment-353381607
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20171221/e1ec308e/attachment.html>


More information about the sr-dev mailing list