<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/11489">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_sdp_rtp: Fix ICE candidates leak.<br><br>Given the non-default configuration of enabling ICE support on an<br>endpoint that does not result in an ICE negotiation occurring the<br>ICE candidates would be leaked.<br><br>This change makes it so that the ICE candidates are only retrieved<br>if ICE negotiation is occurring.<br><br>ASTERISK-28460<br><br>Change-Id: I7b3f76f031c41fb8a3dc3ef1a84b77e2a8cb969f<br>---<br>M res/res_pjsip_sdp_rtp.c<br>1 file changed, 1 insertion(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/89/11489/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_sdp_rtp.c b/res/res_pjsip_sdp_rtp.c</span><br><span>index 7c7040e..cc53913 100644</span><br><span>--- a/res/res_pjsip_sdp_rtp.c</span><br><span>+++ b/res/res_pjsip_sdp_rtp.c</span><br><span>@@ -527,11 +527,7 @@</span><br><span>      struct ast_rtp_engine_ice_candidate *candidate;</span><br><span> </span><br><span>  if (!session->endpoint->media.rtp.ice_support || !(ice = ast_rtp_instance_get_ice(session_media->rtp)) ||</span><br><span style="color: hsl(0, 100%, 40%);">-              !(candidates = ice->get_local_candidates(session_media->rtp))) {</span><br><span style="color: hsl(0, 100%, 40%);">-          return;</span><br><span style="color: hsl(0, 100%, 40%);">- }</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-       if (!session_media->remote_ice) {</span><br><span style="color: hsl(120, 100%, 40%);">+          !session_media->remote_ice || !(candidates = ice->get_local_candidates(session_media->rtp))) {</span><br><span>              return;</span><br><span>      }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/11489">change 11489</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/11489"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I7b3f76f031c41fb8a3dc3ef1a84b77e2a8cb969f </div>
<div style="display:none"> Gerrit-Change-Number: 11489 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>