[asterisk-dev] [Code Review] 4347: Investigate and fix memory leaks in Asterisk

Kevin Harwell reviewboard at asterisk.org
Tue Jan 20 12:26:39 CST 2015



> On Jan. 16, 2015, 10:59 a.m., Mark Michelson wrote:
> > branches/13/res/res_pjsip_pubsub.c, lines 3184-3187
> > <https://reviewboard.asterisk.org/r/4347/diff/1/?file=70618#file70618line3184>
> >
> >     This change seems incorrect. When we call pjsip_evsub_terminate(), the PJ_TRUE parameter means we should get called back when the subscription terminates. The reference that the pjsip_evsub has to the subscription tree should then get decremented in pubsub_on_evsub_state().
> >

It does get decremented in pubsub_on_evsub_state(), but before calling this function (inside pubsub_on_client_refresh()) a ref is added to it. This removes that added ref.


- Kevin


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


On Jan. 15, 2015, 1:15 p.m., Kevin Harwell wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4347/
> -----------------------------------------------------------
> 
> (Updated Jan. 15, 2015, 1:15 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24693
>     https://issues.asterisk.org/jira/browse/ASTERISK-24693
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This patch fixes a few memory leaks that were found in Asterisk.
> 
> 
> Diffs
> -----
> 
>   branches/13/rest-api-templates/param_parsing.mustache 430684 
>   branches/13/res/res_stasis.c 430684 
>   branches/13/res/res_pjsip_pubsub.c 430684 
>   branches/13/res/res_pjsip_mwi.c 430684 
>   branches/13/res/res_pjsip/pjsip_global_headers.c 430684 
>   branches/13/res/res_ari_events.c 430684 
>   branches/13/res/res_ari_endpoints.c 430684 
>   branches/13/res/res_ari_channels.c 430684 
>   branches/13/res/parking/parking_applications.c 430684 
>   branches/13/channels/chan_iax2.c 430684 
> 
> Diff: https://reviewboard.asterisk.org/r/4347/diff/
> 
> 
> Testing
> -------
> 
> Some manual testing done along with inspection of log files and malloc_debug data.  Also ran relevant unit and testsuite tests.
> 
> 
> Thanks,
> 
> Kevin Harwell
> 
>

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


More information about the asterisk-dev mailing list