[asterisk-dev] [Code Review]: Audit of ao2_iterator_init() usage for v1.8

rmudgett reviewboard at asterisk.org
Fri Jan 27 10:11:43 CST 2012



> On Jan. 26, 2012, 9:14 p.m., Mark Michelson wrote:
> > My first pass on this leads me to believe that none of what you have added or altered is incorrect. It appears, though, that there are more places in app_chanspy.c where the iterator is not properly destroyed. Mostly, there are places where there are "goto exit" statements that will bypass iterator destruction.

Good catch.  I missed those places.


- rmudgett


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


On Jan. 26, 2012, 8:03 p.m., rmudgett wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1697/
> -----------------------------------------------------------
> 
> (Updated Jan. 26, 2012, 8:03 p.m.)
> 
> 
> Review request for Asterisk Developers and Mark Michelson.
> 
> 
> Summary
> -------
> 
> I audited the usage of the ao2_iterator_init() function in the v1.8 code base.
> 
> I checked that the iterator was destroyed and that the current iteration object reference was not leaked.
> 
> This patch fixes numerous reference leaks and missing ao2_iterator_destroy() calls as a result.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/apps/app_chanspy.c 352861 
>   /branches/1.8/apps/app_queue.c 352861 
>   /branches/1.8/channels/chan_iax2.c 352861 
>   /branches/1.8/channels/chan_sip.c 352861 
>   /branches/1.8/include/asterisk/indications.h 352861 
>   /branches/1.8/main/indications.c 352861 
>   /branches/1.8/main/pbx.c 352861 
>   /branches/1.8/main/taskprocessor.c 352861 
>   /branches/1.8/res/res_odbc.c 352861 
>   /branches/1.8/res/res_srtp.c 352861 
>   /branches/1.8/res/snmp/agent.c 352861 
> 
> Diff: https://reviewboard.asterisk.org/r/1697/diff
> 
> 
> Testing
> -------
> 
> It compiles. :)
> 
> 
> Thanks,
> 
> rmudgett
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120127/bccb8019/attachment-0001.htm>


More information about the asterisk-dev mailing list