diff options
author | Matthew Jordan <mjordan@digium.com> | 2015-02-08 17:24:22 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2015-02-08 17:24:22 +0000 |
commit | 2ebe811d80a2ea494260134315efd37fa4ff6cbb (patch) | |
tree | cb4e34873ea229ecfe30bdb5a79f18963a52aefe /res/res_pjsip_sdp_rtp.c | |
parent | 7ca1a0da04f6363324274aa7065a12f613f6cee0 (diff) |
res/res_pjsip_sdp_rtp: Fix leak of local ICE candidates when applying to SDP
When an SDP is created for an outgoing request/response, the ICE candidates
obtained from the RTP instance are currently leaked. This causes the ao2
container that holds the candidates to never properly be reclaimed when the
RTP instance is destroyed.
This patch properly decrements the ICE candidates' container if it is
successfully obtained.
ASTERISK-24769 #close
Reported by: Matt Jordan
........
Merged revisions 431600 from http://svn.asterisk.org/svn/asterisk/branches/13
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@431601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_sdp_rtp.c')
-rw-r--r-- | res/res_pjsip_sdp_rtp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c index bc8c748eb..4cac53731 100644 --- a/res/res_pjsip_sdp_rtp.c +++ b/res/res_pjsip_sdp_rtp.c @@ -396,6 +396,7 @@ static void add_ice_to_stream(struct ast_sip_session *session, struct ast_sip_se } ao2_iterator_destroy(&it_candidates); + ao2_ref(candidates, -1); } /*! \brief Function which processes ICE attributes in an audio stream */ |