<p>Joshua Colp has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14933">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_session: Fix session reference leak.<br><br>The ast_sip_dialog_get_session function returns the session<br>with reference count increased. This was not taken into<br>account and was causing sessions to remain around when they<br>should not be.<br><br>ASTERISK-29089<br><br>Change-Id: I430fa721b0a824311a59effec6056e9ec528e3e8<br>---<br>M res/res_pjsip_session.c<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/33/14933/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c</span><br><span>index 19e0528..0091113 100644</span><br><span>--- a/res/res_pjsip_session.c</span><br><span>+++ b/res/res_pjsip_session.c</span><br><span>@@ -5238,7 +5238,7 @@</span><br><span>               tdata->mod_data, session_module.id, MOD_DATA_NAT_HOOK);</span><br><span>   struct pjmedia_sdp_session *sdp;</span><br><span>     pjsip_dialog *dlg = pjsip_tdata_get_dlg(tdata);</span><br><span style="color: hsl(0, 100%, 40%);">- struct ast_sip_session *session = dlg ? ast_sip_dialog_get_session(dlg) : NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+       RAII_VAR(struct ast_sip_session *, session, dlg ? ast_sip_dialog_get_session(dlg) : NULL, ao2_cleanup);</span><br><span>      int stream;</span><br><span> </span><br><span>      /* SDP produced by us directly will never be multipart */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14933">change 14933</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/+/14933"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I430fa721b0a824311a59effec6056e9ec528e3e8 </div>
<div style="display:none"> Gerrit-Change-Number: 14933 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>