[Asterisk-code-review] res_pjsip_sdp_rtp: Fix ICE candidates leak. (...asterisk[13])
Joshua Colp
asteriskteam at digium.com
Mon Jun 24 05:12:21 CDT 2019
Joshua Colp has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/11489
Change subject: res_pjsip_sdp_rtp: Fix ICE candidates leak.
......................................................................
res_pjsip_sdp_rtp: Fix ICE candidates leak.
Given the non-default configuration of enabling ICE support on an
endpoint that does not result in an ICE negotiation occurring the
ICE candidates would be leaked.
This change makes it so that the ICE candidates are only retrieved
if ICE negotiation is occurring.
ASTERISK-28460
Change-Id: I7b3f76f031c41fb8a3dc3ef1a84b77e2a8cb969f
---
M res/res_pjsip_sdp_rtp.c
1 file changed, 1 insertion(+), 5 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/11489/1
diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c
index 7c7040e..cc53913 100644
--- a/res/res_pjsip_sdp_rtp.c
+++ b/res/res_pjsip_sdp_rtp.c
@@ -527,11 +527,7 @@
struct ast_rtp_engine_ice_candidate *candidate;
if (!session->endpoint->media.rtp.ice_support || !(ice = ast_rtp_instance_get_ice(session_media->rtp)) ||
- !(candidates = ice->get_local_candidates(session_media->rtp))) {
- return;
- }
-
- if (!session_media->remote_ice) {
+ !session_media->remote_ice || !(candidates = ice->get_local_candidates(session_media->rtp))) {
return;
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11489
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I7b3f76f031c41fb8a3dc3ef1a84b77e2a8cb969f
Gerrit-Change-Number: 11489
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190624/7d7721f7/attachment.html>
More information about the asterisk-code-review
mailing list