]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_pjsip.c: Check for channel and session to not be NULL in hangup
authoragupta <abhay@avissol.com>
Thu, 6 Jun 2019 12:48:18 +0000 (18:18 +0530)
committerSean Bright <sean.bright@gmail.com>
Thu, 6 Jun 2019 19:24:04 +0000 (13:24 -0600)
commit72f26aa8eb9ec6b07ac790e83df41a0ffdf1af0e
treeff333e1d740b17c180ec40b9ff45f90d7ad9772d
parentde38c9c3b3af69c02b23d9e58c0869fe74437fe9
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
channels/chan_pjsip.c