<p>Kevin Harwell <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/12903">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_mwi: Remove inappropriate topic unreference.<br><br>ast_mwi_topic() returns a borrowed reference which should not be<br>unreferenced, doing so leads to a FRACK. This was hidden by the fact<br>that stasis_cache.c leaked the result of cache_remove in<br>caching_topic_exec.<br><br>Change-Id: I51101bf7d07b8dc8ce8fc46b6cb31fbbd213fbc7<br>---<br>M main/stasis_cache.c<br>M res/res_pjsip_mwi.c<br>2 files changed, 1 insertion(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/stasis_cache.c b/main/stasis_cache.c</span><br><span>index 541261a..0f2d443 100644</span><br><span>--- a/main/stasis_cache.c</span><br><span>+++ b/main/stasis_cache.c</span><br><span>@@ -870,7 +870,7 @@</span><br><span> ao2_wrlock(caching_topic->cache->entries);</span><br><span> sub = cache_find(caching_topic->cache->entries, stasis_subscription_change_type(), change->uniqueid);</span><br><span> if (sub) {</span><br><span style="color: hsl(0, 100%, 40%);">- cache_remove(caching_topic->cache->entries, sub, stasis_message_eid(message));</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup(cache_remove(caching_topic->cache->entries, sub, stasis_message_eid(message)));</span><br><span> ao2_cleanup(sub);</span><br><span> }</span><br><span> ao2_unlock(caching_topic->cache->entries);</span><br><span>diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c</span><br><span>index 46f890b..810db5d 100644</span><br><span>--- a/res/res_pjsip_mwi.c</span><br><span>+++ b/res/res_pjsip_mwi.c</span><br><span>@@ -266,7 +266,6 @@</span><br><span> mailbox, mwi_sub->id, stasis_topic_name(topic), topic, (int)ao2_ref(topic, 0));</span><br><span> ao2_ref(mwi_sub, +1);</span><br><span> mwi_stasis_sub->stasis_sub = stasis_subscribe_pool(topic, mwi_stasis_cb, mwi_sub);</span><br><span style="color: hsl(0, 100%, 40%);">- ao2_ref(topic, -1);</span><br><span> </span><br><span> if (!mwi_stasis_sub->stasis_sub) {</span><br><span> /* Failed to subscribe. */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/12903">change 12903</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/+/12903"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I51101bf7d07b8dc8ce8fc46b6cb31fbbd213fbc7 </div>
<div style="display:none"> Gerrit-Change-Number: 12903 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>