[asterisk-dev] [Code Review] 3119: res_ari: Fix memory leaks.

Kevin Harwell reviewboard at asterisk.org
Fri Jan 10 09:40:01 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3119/#review10562
-----------------------------------------------------------

Ship it!


Ship It!

- Kevin Harwell


On Jan. 9, 2014, 5:34 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3119/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2014, 5:34 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23128
>     https://issues.asterisk.org/jira/browse/ASTERISK-23128
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This change fixes a few memory leaks in the res_ari module:
> 
> 1. The documentation stated that the JSON message passed to ast_ari_response_ok would have its reference stolen. This did not actually occur. I've changed the code to match the documentation and changed callers accordingly.
> 
> 2. I've also updated the ast_ari_response_created function to have the same behavior.
> 
> 3. HTTP response headers were never freed.
> 
> 4. The variable list for wildcard paths was never freed.
> 
> 
> Diffs
> -----
> 
>   /branches/12/res/res_ari.c 405265 
>   /branches/12/res/ari/resource_recordings.c 405265 
>   /branches/12/res/ari/resource_playbacks.c 405265 
>   /branches/12/res/ari/resource_endpoints.c 405265 
>   /branches/12/res/ari/resource_device_states.c 405265 
>   /branches/12/res/ari/resource_channels.c 405265 
>   /branches/12/res/ari/resource_bridges.c 405265 
>   /branches/12/res/ari/resource_applications.c 405265 
>   /branches/12/include/asterisk/ari.h 405265 
> 
> Diff: https://reviewboard.asterisk.org/r/3119/diff/
> 
> 
> Testing
> -------
> 
> Ran under valgrind and invoked some ARI operations which cover the various fixed cases. Stopped, confirmed output showed no leaks in ARI. I also ran with MALLOC_DEBUG enabled and did a "memory show summary".
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140110/d63407d3/attachment-0001.html>


More information about the asterisk-dev mailing list