[OpenSIPS-Users] Memory leak - solved

Callum Guy callum.guy at x-on.co.uk
Mon Dec 9 06:13:03 EST 2019

Hi All,

I wanted to follow up on a recent issue I experienced to understand if
it was due to user error or a bug that needs to be patched.

The issue was traced back to a simple function call in the permissions module:

check_source_address(0, $avp(address_desc))

Nearly every request processed would have been an unlisted source
address and a negative response would have been expected. As an in
memory hash lookup for a small address list (<50 records) this seemed
like a very safe operation to perform.

The AVP is uninitialised at the point of invocation - I am guessing
that this is key to the problem. To resolve the problem I have simply
removed the AVP and the method call is now:


I would like to learn whether using an AVP for this operation was
incorrect or whether there was another reason for the leak. I've had a
go at reviewing the source for permissions and pvar however I quickly
got lost trying to find where the AVP initialisation would have been
invoked. Any advice would be appreciated.

Many thanks,



*0333 332 0000  |  www.x-on.co.uk <http://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> *

is a trading name of Storacall 
Technology Ltd a limited company registered in
England and Wales.

Registered Office : Avaland House, 110 London Road, Apsley, Hemel 
Herts, HP3 9SD. Company Registration No. 2578478.

information in this e-mail is confidential and for use by the addressee(s)

only. If you are not the intended recipient, please notify X-on immediately 
on +44(0)333 332 0000 and delete the
message from your computer. If you are 
not a named addressee you must not use,
disclose, disseminate, distribute, 
copy, print or reply to this email. Views
or opinions expressed by an 
within this email may not necessarily
reflect the views of X-on 
or its associated companies. Although X-on routinely
screens for viruses, 
addressees should scan this email and any attachments
viruses. X-on 
makes no representation or warranty as to the absence of viruses
in this 
email or any attachments.

More information about the Users mailing list