[Asterisk-code-review] pjsip/cli commands: pjsip show channelstats shows wrong codec (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Wed Mar 8 15:21:02 CST 2017


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

Change subject: pjsip/cli_commands: pjsip show channelstats shows wrong codec
......................................................................


Patch Set 8: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/5120/8/channels/pjsip/cli_commands.c
File channels/pjsip/cli_commands.c:

PS8, Line 345: 	struct ast_channel *channel = ast_channel_get_by_name(snapshot->name);
             : 	struct ast_sip_channel_pvt *cpvt = channel ? ast_channel_tech_pvt(channel) : NULL;
Ooops.  Just noticed that channel could be NULL.  The channel could be NULL if the particular channel gets hung up while executing the CLI command.

Will need to get the rawreadformat with the channel lock held but only if the channel is not NULL.


PS8, Line 357: 		ao2_cleanup(channel);
             : 		return -1;
format used to be leaked here.  If you restore format to correct the above NULL channel the leak may also need to be corrected here.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3889ef6a8f6738fc312fab42db5efacd6e452b01
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Daniel Journo <dan at keshercommunications.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Daniel Journo <dan at keshercommunications.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list