[Kamailio-Users] Perl module and memory leak in append_branch

James Puckett jpuckett at e-c-group.com
Wed Aug 26 01:07:51 CEST 2009



I have followed a bit of the discussions regarding the problems with  
memory management between the perl modules and the core kamailio  
software.

I need to get append_branch working from within the perl module so  
that it doesn't cause a memory leak.  It's been a while since I did  
any serious straight C programming, but if someone can point me to the  
correct way to handle memory allocated with the module so that it gets  
freed in the core I'd be glad to take this problem on.

Specifically, I'm using something that looks like:

  $m->append_branch("<sip:".$cdpn."\@".$peers{$_}."?From=%3Csip:". 
$sourcenumber."@".$destIp."%3E;tag=".$fromtag.">", $qval);

This leaves about 190 bytes per call unfreed.


Thanks.

James Puckett - Engineers' Consulting Group
Phone 229-316-0012 - Fax 229-316-1490








More information about the sr-users mailing list