]> 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-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Tue, 3 Sep 2024 14:03:12 +0000 (14:03 +0000)
commit2acd9982de24ceaad3ce8fec186e8144fe03d286
treedd2de47f3d0812fa33eaf7c45982b7bd2a8d1d61
parente99184b3e79f41196c1bab7266a99b662b0f0827
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