[Asterisk-code-review] res_musiconhold: Use a vector instead of custom array allocation (...asterisk[16])
Kevin Harwell
asteriskteam at digium.com
Thu Aug 1 12:58:14 CDT 2019
Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/11654 )
Change subject: res_musiconhold: Use a vector instead of custom array allocation
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
https://gerrit.asterisk.org/#/c/11654/2/res/res_musiconhold.c
File res/res_musiconhold.c:
https://gerrit.asterisk.org/#/c/11654/2/res/res_musiconhold.c@1188
PS2, Line 1188: if (ast_test_flag(class, MOH_SORTALPHA)) {
: res = AST_VECTOR_ADD_SORTED(&class->files, ast_strdup(filepath), strcasecmp);
: } else {
: res = AST_VECTOR_APPEND(&class->files, ast_strdup(filepath));
: }
:
: if (res) {
: break;
: }
Not sure if it matters much cause if adding/appending fails we probably have bigger problems, but if it does fail the duped filepath is leaked.
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11654
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ic476a56608b1820ca93dcf68d10cd76fc0b94141
Gerrit-Change-Number: 11654
Gerrit-PatchSet: 2
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 01 Aug 2019 17:58:14 +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/20190801/cd8de488/attachment.html>
More information about the asterisk-code-review
mailing list