<p>Corey Farrell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/6657">View Change</a></p><p>Patch set 1:</p><p>(4 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/6657/1/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/6657/1/res/res_pjsip/pjsip_configuration.c@1310">Patch Set #1, Line 1310:</a> <code style="font-family:monospace,monospace">             persistent->aors = ast_strdup(endpoint->aors);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Move this outside the 'if (!persistant)' block and add an 'else' block to free the existing aors?</p><p style="white-space: pre-wrap; word-wrap: break-word;">In that case if we fail to allocate the aors we'd have to unlink from persistent_endspoints in addition to returning NULL?</p><p style="white-space: pre-wrap; word-wrap: break-word;">persistant is allocated without a lock, do we need to lock anything to make it safe to free the existing aors?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6657/1/res/res_pjsip/pjsip_configuration.c@1320">Patch Set #1, Line 1320:</a> <code style="font-family:monospace,monospace">        ao2_ref(persistent->endpoint, +1);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">So maybe this should be moved into the 'if (!persistant)' block?</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6657/1/res/res_pjsip/pjsip_configuration.c@1329">Patch Set #1, Line 1329:</a> <code style="font-family:monospace,monospace">  if (!endpoint->persistent) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This may be an issue.  The persistent endpoint has a copy of the endpoint's</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">See other comments.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/6657/1/res/res_pjsip/pjsip_configuration.c@1346">Patch Set #1, Line 1346:</a> <code style="font-family:monospace,monospace">      endpoint->media.topology = ast_stream_topology_create_from_format_cap(endpoint->media.codecs);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This is also leaks.  Should I free the existing stream topology or skip reallocating?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/6657">change 6657</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/6657"/><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: comment </div>
<div style="display:none"> Gerrit-Change-Id: I59bbfc8da8a14d5f4af8c5bb1e71f8592ae823eb </div>
<div style="display:none"> Gerrit-Change-Number: 6657 </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: 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-Comment-Date: Fri, 06 Oct 2017 14:38:00 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>