[Asterisk-code-review] T.140: Fix format ref and memory leaks. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Wed Jan 25 13:42:30 CST 2017
Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/4798 )
Change subject: T.140: Fix format ref and memory leaks.
......................................................................
Patch Set 1:
(2 comments)
https://gerrit.asterisk.org/#/c/4798/1/main/channel.c
File main/channel.c:
PS1, Line 4890: { .frametype = AST_FRAME_TEXT }
> A memset to 0 would be much clearer than initializing just 1 field.
Done
PS1, Line 4898: if (f.data.ptr) {
: res = ast_channel_tech(chan)->write_text(chan, &f);
: ast_frfree(&f);
: }
> A strdup failure isn't worthy of an ERROR?
All asterisk heap allocation functions generate an OOM error message before returning NULL. No need to repeat it.
--
To view, visit https://gerrit.asterisk.org/4798
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifa27a2e0f8a966b1cf628607c86fc4374b0b88cb
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes
More information about the asterisk-code-review
mailing list