<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8583">View Change</a></p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(2 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8583/1/main/sounds.c">File main/sounds.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8583/1/main/sounds.c@234">Patch Set #1, Line 234:</a> <code style="font-family:monospace,monospace">            struct ao2_container *sound_files = ast_media_get_media(sounds_index);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should add the below check before getting sound_files and fixup the variable declarations:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (a->pos != 3) {<br>  return NULL;<br>}</pre><p style="white-space: pre-wrap; word-wrap: break-word;">sound_files = ...</p><p style="white-space: pre-wrap; word-wrap: break-word;">Actually with RAII_VAR removed we can move the variable declarations to the top of the function to eliminate the slightly awkward scoping.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8583/1/main/sounds.c@250">Patch Set #1, Line 250:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">               ao2_iterator_destroy(&it_sounds);<br><br>               return NULL;<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You removed the RAII_VAR so now you need to cleanup sound_files here.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8583">change 8583</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/8583"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I140e1137906bbfcdb61c0c6304159be459ad873e </div>
<div style="display:none"> Gerrit-Change-Number: 8583 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 19 Mar 2018 21:07:37 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>