[Asterisk-code-review] res/res_pjsip_session.c: Check that media type matches in function as... (asterisk[16])

Robert Cripps asteriskteam at digium.com
Thu Jan 7 08:31:10 CST 2021


Attention is currently required from: George Joseph.
Robert Cripps has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/15230 )

Change subject: res/res_pjsip_session.c: Check that media type matches in function ast_sip_session_media_state_add.
......................................................................


Patch Set 1:

(1 comment)

File res/res_pjsip_session.c:

https://gerrit.asterisk.org/c/asterisk/+/15230/comment/41c0c7b7_cd691414 
PS1, Line 533: 	if (!session_media) {
> If there was an existing session_media but the type didn't match and we didn't use the active one, w […]
To dive a bit deeper I've done some tracing of the path that fails my patch condition and indeed it uses the session_media from the if statement below ie the active state so - Given that it's an error to return a non matching "type" from the first if statement how exactly does it leak and how to prevent a leak?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/15230
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I6f6efa9b821ebe8881bb4c8c957f8802ddcb4b5d
Gerrit-Change-Number: 15230
Gerrit-PatchSet: 1
Gerrit-Owner: Robert Cripps <rcripps at voxbone.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Thu, 07 Jan 2021 14:31:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210107/5daa7dc1/attachment-0001.html>


More information about the asterisk-code-review mailing list