[Asterisk-code-review] res_pjsip: prevent crash on websocket disconnect (asterisk[18])

Joshua Colp asteriskteam at digium.com
Tue Oct 25 07:31:17 CDT 2022


Attention is currently required from: Michael Bradeen, George Joseph.

Joshua Colp has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/19413 )

Change subject: res_pjsip: prevent crash on websocket disconnect
......................................................................


Patch Set 3: Code-Review-1

(4 comments)

File res/res_pjsip.c:

https://gerrit.asterisk.org/c/asterisk/+/19413/comment/18cb8b35_ee1d47e0 
PS3, Line 2283: 	pool = pjsip_endpt_create_pool(ast_sip_get_pjsip_endpoint(), "stateful response", 256, 256);
where did the 256 come from?


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/7608ece3_2cd09d41 
PS3, Line 2292: 	if(pj_grp_lock_create_w_handler(pool, NULL, pool, &pool_destroy_callback, &tsx_glock) != PJ_SUCCESS) {
if (

what happens to the pool if this fails?


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/dfdd39f5_9a04836f 
PS3, Line 2298: 	if(pj_grp_lock_add_ref(tsx_glock) != PJ_SUCCESS) {
if (

what happens to the pool if this fails?


https://gerrit.asterisk.org/c/asterisk/+/19413/comment/80097e7f_8d3f55ec 
PS3, Line 2304: 		clean_contact_from_tdata(tdata);
should the grp lock ref be decremented here? what happens to the pool?



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

Gerrit-Project: asterisk
Gerrit-Branch: 18
Gerrit-Change-Id: Id050fded2247a04d8f0fc5b8a2cf3e5482cb8cee
Gerrit-Change-Number: 19413
Gerrit-PatchSet: 3
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: George Joseph <gjoseph at digium.com>
Gerrit-Comment-Date: Tue, 25 Oct 2022 12:31:17 +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/20221025/4464cfc2/attachment-0001.html>


More information about the asterisk-code-review mailing list