<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/10995">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res/res_pjsip: Resources (udptl fd) are leaking for T.38 calls<br><br>Fix unbalanced references for datastore t38_session_media<br><br>ASTERISK-28288<br><br>Change-Id: Id6dceceb06651b03f611bf33deb3061022fe5d0c<br>---<br>M res/res_pjsip_t38.c<br>1 file changed, 11 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c</span><br><span>index cd225d4..62bbb48 100644</span><br><span>--- a/res/res_pjsip_t38.c</span><br><span>+++ b/res/res_pjsip_t38.c</span><br><span>@@ -147,18 +147,23 @@</span><br><span> }</span><br><span> </span><br><span> /*! \brief Helper function which allocates datastore with a session media */</span><br><span style="color: hsl(0, 100%, 40%);">-static struct ast_datastore *create_datastore_session_media(struct ast_sip_session *session, struct ast_sip_session_media *session_media)</span><br><span style="color: hsl(120, 100%, 40%);">+static int create_datastore_session_media(struct ast_sip_session *session, struct ast_sip_session_media *session_media)</span><br><span> {</span><br><span> struct ast_datastore *datastore = NULL;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (!(datastore = ast_sip_session_alloc_datastore(&session_media_datastore, "t38_session_media"))</span><br><span style="color: hsl(0, 100%, 40%);">- || ast_sip_session_add_datastore(session, datastore)) {</span><br><span style="color: hsl(0, 100%, 40%);">- return NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!(datastore = ast_sip_session_alloc_datastore(&session_media_datastore, "t38_session_media"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (ast_sip_session_add_datastore(session, datastore)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_ref(datastore, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span> }</span><br><span> </span><br><span> datastore->data = session_media;</span><br><span> ao2_bump(session_media);</span><br><span style="color: hsl(0, 100%, 40%);">- return datastore;</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_ref(datastore, -1);</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span> }</span><br><span> </span><br><span> /*! \brief Helper function for changing the T.38 state */</span><br><span>@@ -296,7 +301,7 @@</span><br><span> return 0;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- if (!create_datastore_session_media(session, session_media)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (create_datastore_session_media(session, session_media)) {</span><br><span> return -1;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/10995">change 10995</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/10995"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13.25 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Id6dceceb06651b03f611bf33deb3061022fe5d0c </div>
<div style="display:none"> Gerrit-Change-Number: 10995 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation (1000185) </div>
<div style="display:none"> Gerrit-Reviewer: Joshua C. Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Paulo Vicentini <paulo.vicentini@gmail.com> </div>