[Asterisk-code-review] res pjsip rfc3326.c: Fix crash when channel goes away. (asterisk[master])

Matt Jordan asteriskteam at digium.com
Mon Nov 16 10:32:55 CST 2015


Matt Jordan has posted comments on this change.

Change subject: res_pjsip_rfc3326.c: Fix crash when channel goes away.
......................................................................


Patch Set 1:

(1 comment)

https://gerrit.asterisk.org/#/c/1626/1/res/res_pjsip_rfc3326.c
File res/res_pjsip_rfc3326.c:

Line 105: 	if ((pjsip_method_cmp(&tdata->msg->line.req.method, &pjsip_bye_method)
        : 			&& pjsip_method_cmp(&tdata->msg->line.req.method, &pjsip_cancel_method))
        : 		|| !session->channel
        : 		/*
        : 		 * The session->channel has been seen to go away on us between
        : 		 * checks so we must also be running under the call's serializer
        : 		 * thread.
        : 		 */
        : 		|| session->serializer != ast_threadpool_serializer_get_current()) {
        : 		return;
        : 	}
If the channel can go away on us between checks, should something be holding a reference to the channel?

Also: this feels like it could happen in a lot more locations than just adding a reason header on the way out.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I866388d2b97ea2032eaae3f3ab3f1ca6cbd2df89
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list