[sr-dev] [kamailio/kamailio] Fix memory leak when converting body to multipart with set_body_multipart(); (#587)

sergey-vb notifications at github.com
Thu Apr 28 08:14:29 CEST 2016


Hi, All.

I have some problems with pkg_memory leak.

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

I need to modify SDP in invite and other packets.
When I do in script

====================================================

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

record_route();
dlg_manage
route(RELAY);
====
I make test this on kamailio 4.3.5 and 4.4.0 - same issue.

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.

This patch solves it for me.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/587

-- Commit Summary --

  * Update textops.c
  * Update msg_translator.c

-- File Changes --

    M modules/textops/textops.c (2)
    M msg_translator.c (7)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/587.patch
https://github.com/kamailio/kamailio/pull/587.diff

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/587
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160427/4670d5a2/attachment.html>


More information about the sr-dev mailing list