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

arik notifications at github.com
Thu Dec 21 16:41:06 CET 2017


Daniel, Hello,

 

Thanks for the insight. I’ll look into it sometime next week. Hopefully I can resolve.

 

Arik

 

From: Daniel-Constantin Mierla <notifications at github.com>
Reply-To: kamailio/kamailio <reply at reply.github.com>
Date: Thursday, 21 December 2017 at 17:37
To: kamailio/kamailio <kamailio at noreply.github.com>
Cc: arik <arik.halperin at gmail.com>, Author <author at noreply.github.com>
Subject: Re: [kamailio/kamailio] http_async_client frees pointer twice(Kamailio 5.0.4) (#1340)

 

@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 authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.



-- 
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-353382466
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20171221/f4a248ac/attachment-0001.html>


More information about the sr-dev mailing list