[Asterisk-code-review] res/res pjsip: Add preferred codec only config to pjsip endp... (asterisk[master])

Joshua Colp asteriskteam at digium.com
Wed Sep 7 05:30:44 CDT 2016


Joshua Colp has posted comments on this change.

Change subject: res/res_pjsip: Add preferred_codec_only config to pjsip endpoint.
......................................................................


Patch Set 9: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/#/c/3762/9/res/res_pjsip_sdp_rtp.c
File res/res_pjsip_sdp_rtp.c:

Line 364: 			ast_format_cap_append(caps, ast_format_cap_get_format(joint,0), 0);
This line leaks a format reference each time it is run.
The ast_format_cap_get_format function returns the format with the reference count bumped. The ast_format_cap_append function does not steal a reference, it also bumps it. This means after this is run the format reference count will still have that reference it shouldn't. You'll need to store the format in a variable and decrement it after the append.


-- 
To view, visit https://gerrit.asterisk.org/3762
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iad04dc55055403bbf5ec050997aee2dadc4f0762
Gerrit-PatchSet: 9
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Aaron An <anjb at ti-net.com.cn>
Gerrit-Reviewer: Aaron An <anjb at ti-net.com.cn>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list