[asterisk-dev] [Code Review] Clean up reference leaks in res_jabber

opticron reviewboard at asterisk.org
Wed Oct 26 13:05:49 CDT 2011


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



/branches/1.8/res/res_jabber.c
<https://reviewboard.asterisk.org/r/1478/#comment8762>

    The four unrefs above are unnecessary if you move the initialization down to this line since client is first used below.


These changes look good.  Any uses of ASTOBJ_CONTAINER_FIND should also be accompanied by an unref where an object is successfully found, but you may want to leave that for another patch (there are a lot of these that need to be fixed).

- opticron


On Oct. 3, 2011, 4:06 p.m., jrose wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1478/
> -----------------------------------------------------------
> 
> (Updated Oct. 3, 2011, 4:06 p.m.)
> 
> 
> Review request for Asterisk Developers and Tilghman Lesher.
> 
> 
> Summary
> -------
> 
> I'm pretty sure there are object reference leaks throughout res_jabber and this patch is meant to clear some of those.  I'm still a little inexperienced in this area though, so I could definitely use a second pair of eyes to make sure this is all appropriate.
> 
> 
> Diffs
> -----
> 
>   /branches/1.8/res/res_jabber.c 333264 
> 
> Diff: https://reviewboard.asterisk.org/r/1478/diff
> 
> 
> Testing
> -------
> 
> I'm absolutely sure the one involved with devstate publishing is getting leaked because I could publish devstates multiple times in a row and every time once the operation was over, the reference count would be one higher.  I'm not 100% sure on the others since I didn't individually test them, but the idea seems the same and all of these ASTOBJ_REF calls were added around the same time by Tilghman, so it seems like it would be a consistent problem.
> 
> 
> Thanks,
> 
> jrose
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20111026/09618ad7/attachment.htm>


More information about the asterisk-dev mailing list