<p>Richard Mudgett <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/5974">View Change</a></p><p>Patch set 3:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(4 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/5974/3/res/res_pjsip.c">File res/res_pjsip.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5974/3/res/res_pjsip.c@3082">Patch Set #3, Line 3082:</a> <code style="font-family:monospace,monospace">            return NULL;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Need to clean up on this error exit:</p><p style="white-space: pre-wrap; word-wrap: break-word;">dlg->sess_count--;<br>pjsip_dlg_terminate(dlg);<br>return NULL;</p></li></ul></li><li><p><a href="https://gerrit.asterisk.org/#/c/5974/3/res/res_pjsip/pjsip_configuration.c">File res/res_pjsip/pjsip_configuration.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5974/3/res/res_pjsip/pjsip_configuration.c@1161">Patch Set #3, Line 1161:</a> <code style="font-family:monospace,monospace"> for (val = ast_strdupa(var->value); *val; val++) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You don't even need to call ast_strdupa() since you are not modifying var->value in either place it is called.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5974/3/res/res_pjsip/pjsip_configuration.c@1163">Patch Set #3, Line 1163:</a> <code style="font-family:monospace,monospace">                     return -1;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should add an error message like in tos_handler().</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/5974/3/res/res_pjsip/pjsip_configuration.c@1167">Patch Set #3, Line 1167:</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;">      if (ast_string_field_set(endpoint, fromuser, ast_strdupa(var->value)) == -1) {<br>             return -1;<br>    }<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">You may as well treat ast_string_field_set() as a void function.  No where else in the system checks the return value.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/5974">change 5974</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/5974"/><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: I0396fdb5080604e0bdf1277464d5c8a85db913d0 </div>
<div style="display:none"> Gerrit-Change-Number: 5974 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@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: Fri, 07 Jul 2017 22:59:01 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>