[Asterisk-code-review] loader: support for permanent dlopen() (...asterisk[master])
Corey Farrell
asteriskteam at digium.com
Wed Apr 3 16:41:08 CDT 2019
Corey Farrell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11217 )
Change subject: loader: support for permanent dlopen()
......................................................................
Patch Set 2: Code-Review-1
(2 comments)
> > Patch Set 1: Code-Review-1
> >
> > (11 comments)
>
> Hello Corey,
>
> Thank you very much for the wonderful feedback. I have amended the
> code accordingly (to the best of my knowledge). I hope this meets
> your expectations. I compile-tested the changes, no warnings. I'll
> run-test this tomorrow and ping you back.
>
> Best regards,
> Seb
A couple more issues I noticed. In addition please make sure you use `./configure --enable-dev-mode --enable-permanent-dlopen` for testing. This configures the compiler to be more aggressive about what will cause a compile error.
https://gerrit.asterisk.org/#/c/11217/2/main/loader.c
File main/loader.c:
https://gerrit.asterisk.org/#/c/11217/2/main/loader.c@178
PS2, Line 178: strcpy(new_entry->name, name);
Please add a comment /* SAFE */ to the end of this line.
https://gerrit.asterisk.org/#/c/11217/2/main/loader.c@720
PS2, Line 720: ao2_link(info_list, obj_tmp);
I missed this, you are leaking a reference to obj_tmp. ao2_link doesn't steal the allocation reference, the container gets a new reference. So you need to ao2_ref(obj_tmp, -1) to balance the info_list_obj_alloc.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11217
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I86693a0ecf25d5ba81c73773a03df4abc3426875
Gerrit-Change-Number: 11217
Gerrit-PatchSet: 2
Gerrit-Owner: Sebastian Kemper <sebastian_ml at gmx.net>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Sebastian Kemper <sebastian_ml at gmx.net>
Gerrit-Comment-Date: Wed, 03 Apr 2019 21:41:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190403/523cbba9/attachment.html>
More information about the asterisk-code-review
mailing list