<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6658">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip: Fix leak of persistent endpoint references.<br><br>sip_endpoint_apply_handler may be called multiple times on the same<br>endpoint, this added extra references to endpoint->persistent.<br><br>ASTERISK-27306<br><br>Change-Id: I59bbfc8da8a14d5f4af8c5bb1e71f8592ae823eb<br>---<br>M res/res_pjsip/pjsip_configuration.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/58/6658/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c<br>index 4374766..6db5314 100644<br>--- a/res/res_pjsip/pjsip_configuration.c<br>+++ b/res/res_pjsip/pjsip_configuration.c<br>@@ -1325,8 +1325,11 @@<br> {<br>     struct ast_sip_endpoint *endpoint = obj;<br> <br>-  if (!(endpoint->persistent = persistent_endpoint_find_or_create(endpoint))) {<br>-             return -1;<br>+   if (!endpoint->persistent) {<br>+              endpoint->persistent = persistent_endpoint_find_or_create(endpoint);<br>+              if (!endpoint->persistent) {<br>+                      return -1;<br>+           }<br>     }<br> <br>  if (endpoint->extensions.timer.min_se < 90) {<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6658">change 6658</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/6658"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 14 </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I59bbfc8da8a14d5f4af8c5bb1e71f8592ae823eb </div>
<div style="display:none"> Gerrit-Change-Number: 6658 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>