Review Board 1.7.16


chan_sip: Fix leak of SIP registrations

Review Request #4355 - Created Jan. 19, 2015 and submitted

Matt Jordan
13
ASTERISK-24640, ASTERISK-24673
Reviewers
asterisk-dev
Asterisk
When the SIP registrations were migrated to using ao2 in what was then trunk, the explicit destruction of the registrations on module reload was removed and not replaced with an ao2 equivalent. Debugging done by Stefan Engström, the issue reporter, on ASTERISK-24673 confirmed that the reference in the registry_list container was being leaked.

Since the purpose of cleanup_all_regs is to prep a registration for destruction, this function has been converted to being an ao2_callback function callback, and an ao2_callback with OBJ_MULTIPLE | OBJ_NODATA | OBJ_UNLINK is now used to invoke the function. This cleans up each registration, but also removes it from the registration container registry_list.
Created an outbound registration to a SIP trunk. Confirmed that Asterisk was registered. Commented out the "register" line sip.conf, reloaded, and confirmed that the registration was gone.

Stefan tested the patch independently and also confirmed that it fixed it on his test system.
Total:
2
Open:
0
Resolved:
2
Dropped:
0
Status:
From:
Description From Last Updated Status
Review request changed
Updated (Jan. 21, 2015, 8:23 a.m.)
  • changed from pending to submitted
Committed in revision 430882

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.