[asterisk-bugs] [JIRA] (ASTERISK-23128) res_ari: Memory leak on response headers and some JSON response messages

Joshua Colp (JIRA) noreply at issues.asterisk.org
Sun Jan 12 16:25:12 CST 2014


     [ https://issues.asterisk.org/jira/browse/ASTERISK-23128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua Colp closed ASTERISK-23128.
----------------------------------

    Resolution: Fixed
    
> res_ari: Memory leak on response headers and some JSON response messages
> ------------------------------------------------------------------------
>
>                 Key: ASTERISK-23128
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23128
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Resources/res_ari
>    Affects Versions: 12.0.0
>            Reporter: Joshua Colp
>            Assignee: Joshua Colp
>
> There are currently a few leaks in the res_ari area of Asterisk 12:
> 1. A headers field on the response structure of type ast_str is allocated in ast_ari_callback which contains the HTTP response headers to send. This is never freed. I see no reason to have another response_headers ast_str as well, so response.headers can just be passed to ast_http_send directly.
> 2. A lot of ast_ari_response_ok usage assumes that it steals the JSON reference when in reality it increments it itself. This is counter to the documentation and is causing JSON message responses to not get freed. Either the function needs to do as documented and steal, or it needs to be documented that it bumps it itself and an audit done for callers.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list