<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17969">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_outbound_authenticator_digest: Prevent ABRT on cleanup<br><br>In dev mode, if you call pjsip_auth_clt_deinit() with an auth_sess<br>that hasn't been initialized, it'll assert and abort.  If<br>digest_create_request_with_auth() fails to find the proper<br>auth object however, it jumps to its cleanup which does exactly<br>that.  So now we no longer attempt to call pjsip_auth_clt_deinit()<br>if we never actually initialized it.<br><br>ASTERISK-29888<br><br>Change-Id: Ib6171c25c9fe8e61cc8d11129e324c021bc30b62<br>---<br>M res/res_pjsip_outbound_authenticator_digest.c<br>1 file changed, 4 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/69/17969/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_outbound_authenticator_digest.c b/res/res_pjsip_outbound_authenticator_digest.c</span><br><span>index e6702b4..4821082 100644</span><br><span>--- a/res/res_pjsip_outbound_authenticator_digest.c</span><br><span>+++ b/res/res_pjsip_outbound_authenticator_digest.c</span><br><span>@@ -563,8 +563,10 @@</span><br><span> </span><br><span> cleanup:</span><br><span> #if defined(HAVE_PJSIP_AUTH_CLT_DEINIT)</span><br><span style="color: hsl(0, 100%, 40%);">- /* Release any cached auths */</span><br><span style="color: hsl(0, 100%, 40%);">-  pjsip_auth_clt_deinit(&auth_sess);</span><br><span style="color: hsl(120, 100%, 40%);">+        /* If we initialized the auth_sess, clean it up */</span><br><span style="color: hsl(120, 100%, 40%);">+    if (auth_sess.endpt) {</span><br><span style="color: hsl(120, 100%, 40%);">+                pjsip_auth_clt_deinit(&auth_sess);</span><br><span style="color: hsl(120, 100%, 40%);">+        }</span><br><span> #endif</span><br><span> </span><br><span>      ast_sip_cleanup_auth_objects_vector(&auth_objects_vector);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17969">change 17969</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/17969"/><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-Change-Id: Ib6171c25c9fe8e61cc8d11129e324c021bc30b62 </div>
<div style="display:none"> Gerrit-Change-Number: 17969 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>