]> 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:06 +0000 (14:03 +0000)
commit3e2bb5a01a25b7ca44f7c48d5665e9dd9da90ce9
tree1c5f7b556e61de24df3ecc80ffea1a5284b79453
parent69b7fa29d76b8127d17401acae99c2c1990697c4
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