[Asterisk-code-review] CLI: Address multiple issues. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Tue Dec 19 14:32:47 CST 2017


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

Change subject: CLI: Address multiple issues.
......................................................................


Patch Set 2: Code-Review-1

(3 comments)

https://gerrit.asterisk.org/#/c/7663/2/main/asterisk.c
File main/asterisk.c:

https://gerrit.asterisk.org/#/c/7663/2/main/asterisk.c@1724
PS2, Line 1724: 			if (setsockopt(s, SOL_SOCKET, SO_PASSCRED, &sckopt, sizeof(sckopt)) < 0) {
              : 				ast_log(LOG_WARNING, "Unable to turn on socket credentials passing\n");
Shouldn't we be closing s here?


https://gerrit.asterisk.org/#/c/7663/2/main/manager.c
File main/manager.c:

https://gerrit.asterisk.org/#/c/7663/2/main/manager.c@2373
PS2, Line 2373: 					char *syntax = ast_xmldoc_printable(S_OR(cur->syntax, "Not available"), 1);
              : 					char *synopsis = ast_xmldoc_printable(S_OR(cur->synopsis, "Not available"), 1);
              : 					char *description = ast_xmldoc_printable(S_OR(cur->description, "Not available"), 1);
              : 					char *arguments = ast_xmldoc_printable(S_OR(cur->arguments, "Not available"), 1);
              : 					char *seealso = ast_xmldoc_printable(S_OR(cur->seealso, "Not available"), 1);
              : 					char *privilege = ast_xmldoc_printable(S_OR(auth_str, "Not available"), 1);
              : 					char *responses = ast_xmldoc_printable("None", 1);
We should free these and abort the command if any returns NULL.


https://gerrit.asterisk.org/#/c/7663/2/pbx/pbx_config.c
File pbx/pbx_config.c:

https://gerrit.asterisk.org/#/c/7663/2/pbx/pbx_config.c@1530
PS2, Line 1530: 			if (!partial_match(ast_get_context_name(c), a->word, len))
              : 				continue;
This leaves context c locked.



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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: I8f633ceb1714867ae30ef4e421858f77c14485a9
Gerrit-Change-Number: 7663
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Tue, 19 Dec 2017 20:32:47 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/7c7393a7/attachment.html>


More information about the asterisk-code-review mailing list