<p>Hi, All.</p>

<p>I have some problems with pkg_memory leak.</p>

<p>After each call used private memory of the "udp receiver" process<br>
increases at 2500 bytes.<br>
On test environment I hav set it to 2Mbyte, but it is full after 700 calls.</p>

<p>I need to modify SDP in invite and other packets.<br>
When I do in script</p>

<h1></h1>

<p>if(has_body("application/sdp"))<br>
   set_body_multipart();<br>
   if (msg_apply_changes())<br>
    {<br>
       xlog("L_INFO", "ISUP 1 Changes Applied Succesfully");<br>
    }<br>
}</p>

<p>record_route();<br>
dlg_manage</p>

<h1>route(RELAY);</h1>

<p>I make test this on kamailio 4.3.5 and 4.4.0 - same issue.</p>

<p>After discussion in mailing list with Daniel-Constantin Mierla, I have done debugging memory usage by process and found 3 points where memory hase not freeing after execution.</p>

<p>This patch solves it for me.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/587'>https://github.com/kamailio/kamailio/pull/587</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Update textops.c</li>
  <li>Update msg_translator.c</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/587/files#diff-0">modules/textops/textops.c</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/kamailio/kamailio/pull/587/files#diff-1">msg_translator.c</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/587.patch'>https://github.com/kamailio/kamailio/pull/587.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/587.diff'>https://github.com/kamailio/kamailio/pull/587.diff</a></li>
</ul>

<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 or <a href="https://github.com/kamailio/kamailio/pull/587">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AF36Zbk80Fi5e-GOQZ6l9wdDOqMmux_jks5p8FBFgaJpZM4IRnVS.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/587"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>