[Asterisk-code-review] chan sip: Don't unload module while TCP/TLS threads are stil... (asterisk[master])

Michael Kuron asteriskteam at digium.com
Wed Dec 7 13:26:15 CST 2016


Michael Kuron has posted comments on this change. ( https://gerrit.asterisk.org/4536 )

Change subject: chan_sip: Don't unload module while TCP/TLS threads are still running
......................................................................


Patch Set 3:

(3 comments)

Thanks, I'm happy to test it when you have it ready.

https://gerrit.asterisk.org/#/c/4536/3/channels/chan_sip.c
File channels/chan_sip.c:

Line 1783: 		if (event_state_compositors[i].compositor) {
> The if statement is not needed, it is safe to call ao2_cleanup on a NULL va
I added these specifically to address a failed assert (bad magic 0x0...) in ao2_cleanup. It seemed like something in there wasn't NULL-aware.


Line 35200: 	if (!threadt) {
> Unclear why this conditional is needed, load_module should never be run unl
You are right, this is not necessary.


PS3, Line 35533: 	default_tls_cfg.certfile = ast_strdup("");
               : 	default_tls_cfg.pvtfile = ast_strdup("");
               : 	default_tls_cfg.cipher = ast_strdup("");
               : 	default_tls_cfg.cafile = ast_strdup("");
               : 	default_tls_cfg.capath = ast_strdup("");
> No can do.  Each of these are memory leaks.
Copied these from sip_reload(). Setting them to NULL will probably work too.


-- 
To view, visit https://gerrit.asterisk.org/4536
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I23a8abf9e8f73b57ff7ada61984b8506aea6cbde
Gerrit-PatchSet: 3
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Michael Kuron <m.kuron at gmx.de>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Michael Kuron <m.kuron at gmx.de>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list