<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7114">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">main/sdp_state: Check for errors from ast_stream_topology_set_stream.<br><br>Change-Id: I84a83ae69daba5d185cc1d939b133a4c23565497<br>---<br>M main/sdp_state.c<br>1 file changed, 12 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/14/7114/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/sdp_state.c b/main/sdp_state.c<br>index a77d96d..2b75cc2 100644<br>--- a/main/sdp_state.c<br>+++ b/main/sdp_state.c<br>@@ -1255,7 +1255,10 @@<br> return -1;<br> }<br> idx = AST_VECTOR_GET(current_vect, current_idx);<br>- ast_stream_topology_set_stream(merged_topology, idx, merged_stream);<br>+ if (ast_stream_topology_set_stream(merged_topology, idx, merged_stream)) {<br>+ ast_stream_free(merged_stream);<br>+ return -1;<br>+ }<br> <br> /*<br> * The current_stream cannot be considered a backfill_candidate<br>@@ -1400,7 +1403,10 @@<br> if (!merged_stream) {<br> goto fail;<br> }<br>- ast_stream_topology_set_stream(merged_topology, idx, merged_stream);<br>+ if (ast_stream_topology_set_stream(merged_topology, idx, merged_stream)) {<br>+ ast_stream_free(merged_stream);<br>+ goto fail;<br>+ }<br> }<br> <br> /* Backfill new update stream slots into pre-existing declined current stream slots */<br>@@ -1438,7 +1444,10 @@<br> }<br> <br> /* Add the new stream into the backfill stream slot. */<br>- ast_stream_topology_set_stream(merged_topology, current_idx, merged_stream);<br>+ if (ast_stream_topology_set_stream(merged_topology, current_idx, merged_stream)) {<br>+ ast_stream_free(merged_stream);<br>+ goto fail;<br>+ }<br> backfill_candidate[current_idx] = 0;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7114">change 7114</a>. To unsubscribe, 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/7114"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I84a83ae69daba5d185cc1d939b133a4c23565497 </div>
<div style="display:none"> Gerrit-Change-Number: 7114 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>