]> 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)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 12 Sep 2024 18:44:38 +0000 (18:44 +0000)
commitbbc02d16cbcb9ce0c3f75212d887344430c78333
treef24df6b2bfd8707915e6de7515d80f3de7e44b3f
parent7f6ad88522f2a969be4acc2c2e6ce4bef630a851
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
(cherry picked from commit 8b39a956e70cc438372bb89f735c0d2202641e02)
main/rtp_engine.c
res/res_pjsip_sdp_rtp.c