<p>Corey Farrell has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/6657">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/57/6657/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 3a752c9..3a3df0e 100644<br>--- a/res/res_pjsip/pjsip_configuration.c<br>+++ b/res/res_pjsip/pjsip_configuration.c<br>@@ -1326,8 +1326,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/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: newchange </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>