]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip_sdp_rtp fix leaking astobj2 ast_format
authorAlexei Gradinari <alex2grad@gmail.com>
Fri, 23 Aug 2024 20:28:24 +0000 (16:28 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Tue, 3 Sep 2024 14:03:05 +0000 (14:03 +0000)
commit8b39a956e70cc438372bb89f735c0d2202641e02
tree0991649cfe58f7879d2d3d4861ad14daeb979580
parent0284099a9830436167fea5b1f8566c7bebf03bb8
res_pjsip_sdp_rtp fix leaking astobj2 ast_format

PR #700 added a preferred_format for the struct ast_rtp_codecs,
but when set the preferred_format it leaks an astobj2 ast_format.
In the next code
ast_rtp_codecs_set_preferred_format(&codecs, ast_format_cap_get_format(joint, 0));
both functions ast_rtp_codecs_set_preferred_format
and ast_format_cap_get_format increases the ao2 reference count.

Fixes: #856
main/rtp_engine.c
res/res_pjsip_sdp_rtp.c