<p>Found the leak with <code>valgrind</code>. Added as a second commit. Going to run in production for a few days and see if memory stays stable.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/724#issuecomment-234955856">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZbVitXgtJxQupkdMBeSIqNCTU_OBks5qZLzlgaJpZM4JSnOj">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZbgL8iATfdYLIatYMvVgm1g1qHXsks5qZLzlgaJpZM4JSnOj.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/724#issuecomment-234955856"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>