#242 [nat_traversal] Memory Leak in TM Callback Fix

modules (179)

There appears to be a memory leak in the nat_traversal module when the TM reply callback is used (in cases of relaying the REGISTER).

Attached patch fixes the memory leak, is pretty simple and had no side effects in my testing.


  • Jim OBrien

    Jim OBrien - 2012-08-25

    Hi David,
    Did you see symptoms like the number of transactions being reported as in use by opensipsctl monitor incrementing close to the total transactions handled before a crash / memory exhaustion?


    Jim O

  • David Sanders

    David Sanders - 2012-08-25

    I didn't see that, but I wasn't watching opensipsctl monitor.

    What I was seeing was memory exhaustion of package memory eventually leading to segfaults in random places where memory wasn't being checked before use.

    I can check to see what opensipsctl monitor says when reproducing this. With a SIPp script doing REGISTERs it only takes around 15k before memory is totally exhausted.

    - David

  • Bogdan-Andrei Iancu

    • assigned_to: nobody --> saghul
  • Bogdan-Andrei Iancu

    The fix seems to be ok.....Maybe Saul should validate and upload the patch.

  • saghul

    saghul - 2012-08-28
    • status: open --> closed-accepted
  • saghul

    saghul - 2012-08-28

    Hi David,

    Thanks for the fix! I applied it to trunk, 1.8 and 1.7 branches.



Log in to post a comment.