[Asterisk-code-review] chan_pjsip.c: Check for channel and session to not be NULL in hangup (...asterisk[16])

Sean Bright asteriskteam at digium.com
Thu Jun 6 14:24:13 CDT 2019


Sean Bright has uploaded a new patch set (#6) to the change originally created by Abhay Gupta. ( https://gerrit.asterisk.org/c/asterisk/+/11444 )

Change subject: chan_pjsip.c: Check for channel and session to not be NULL in hangup
......................................................................

chan_pjsip.c: Check for channel and session to not be NULL in hangup

We have seen some rare case of segmentation fault in hangup function
and we could notice that channel pointer was NULL.  Debug log shows
that there is a 200 OK answer and SIP timeout at the same time.  It
looks that while the SIP session was being destroyed due to timeout
call hangup due to answer event lead to race condition and channel
is being destroyed from two different places.  The check ensures we
check it not to be NULL before freeing it.

ASTERISK-25371

Change-Id: I19f6566830640625e08f7b87bfe15758ad33a778
---
M channels/chan_pjsip.c
1 file changed, 19 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/44/11444/6
-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/11444
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I19f6566830640625e08f7b87bfe15758ad33a778
Gerrit-Change-Number: 11444
Gerrit-PatchSet: 6
Gerrit-Owner: Abhay Gupta <abhay at avissol.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190606/4bcf2dfc/attachment.html>


More information about the asterisk-code-review mailing list