summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2015-02-08 17:24:01 +0000
committerMatthew Jordan <mjordan@digium.com>2015-02-08 17:24:01 +0000
commit675b2b8103da5551fcf19398cb0793b8602d4452 (patch)
tree5516b63e62e7b47c33408e6133e092a1684334d5
parent323c0927ac63ce1c13133961bd46abbf6d265a18 (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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@431600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--res/res_pjsip_sdp_rtp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index fb194c54e..6471341b3 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 */