[Asterisk-code-review] loader: Minor fix to module registration. (asterisk[master])

Richard Mudgett asteriskteam at digium.com
Thu Dec 14 17:20:58 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/7518 )

Change subject: loader: Minor fix to module registration.
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/7518/1/main/loader.c
File main/loader.c:

https://gerrit.asterisk.org/#/c/7518/1/main/loader.c@198
PS1, Line 198: 	mod = resource_being_loaded;
Why not set resource_being_loaded to NULL here since we are taking the resource and putting it into the list.  This way load_dynamic_module() doesn't need to know we stick it on the end of the list and we don't need these comments proclaiming dire consequences if it isn't put on the end.  It just needs to see that resource_being_loaded became NULL after dlopen().


https://gerrit.asterisk.org/#/c/7518/1/main/loader.c@574
PS1, Line 574: 		return NULL;
Isn't mod leaked here?  The module didn't register itself so it shouldn't be in the module_list and nobody else should know about it now.



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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I40f07a315e55b92df4fc7faf525ed6d4f396e7d2
Gerrit-Change-Number: 7518
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Comment-Date: Thu, 14 Dec 2017 23:20:58 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171214/d5e2faa8/attachment-0001.html>


More information about the asterisk-code-review mailing list