<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/7046">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">stream: Free stream on error appending vector.<br><br>Change-Id: I6c0d12755743eadba1357f6153526cc055592856<br>---<br>M main/stream.c<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/46/7046/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/main/stream.c b/main/stream.c<br>index 72d8599..fa7387b 100644<br>--- a/main/stream.c<br>+++ b/main/stream.c<br>@@ -398,7 +398,10 @@<br> stream->position = position;<br> <br> if (position == AST_VECTOR_SIZE(&topology->streams)) {<br>- AST_VECTOR_APPEND(&topology->streams, stream);<br>+ if (AST_VECTOR_APPEND(&topology->streams, stream)) {<br>+ ast_stream_free(stream);<br>+ return -1;<br>+ }<br> return 0;<br> }<br> <br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7046">change 7046</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/7046"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I6c0d12755743eadba1357f6153526cc055592856 </div>
<div style="display:none"> Gerrit-Change-Number: 7046 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>