link_contact_to_impu() does not behave as intended - it will return immediately because ptr==contact .
This will lead to a crash when current contact is always different than the previous.
To prevent this, I set ptr to 0 as it points to a chunk of freed memory anyway.
Removed call to unlink_contact_from_impu() as I believed is redundant and it leads to double free.
This is an usual scenario and it happens with devices that reconnect on TCP , and they change the src port every time , and then the contact will be different.


You can view, comment on, or merge this pull request online at:

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

Commit Summary

File Changes

Patch Links:


Reply to this email directly or view it on GitHub.