<p>Thanks for this deep review. Amended that commit, it should be in this pull request now (<a href="https://github.com/kamailio/kamailio/commit/9ccc3f510ce2d97dbe1efb690ef1d4e8f18885d5" class="commit-link"><tt>9ccc3f5</tt></a>).</p>

<p>What about that double dlg_unref() at dlg_handlers.c near 1408 after dlg_bye_all() in case of non-zero return? Is it ok?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/kamailio/kamailio/pull/246#issuecomment-121737781">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZYIZN7pW7t3enIA5GhMRNMjnapW3ks5odrqcgaJpZM4FY4B2.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/kamailio/kamailio/pull/246#issuecomment-121737781"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>