]> 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:10 +0000 (14:03 +0000)
commit6ef45482234ddc6fa37994bbe9f1aed928411186
tree2a09e0a1c459754189323d0d2b8a0b5dcb2a4cdd
parentca15a2c0341ace90284aa466f2af6ab251d8a58c
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