summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Nicholson <mnicholson@digium.com>2011-05-16 15:54:52 +0000
committerMatthew Nicholson <mnicholson@digium.com>2011-05-16 15:54:52 +0000
commit8e719c62b04d052b6d9b8f7f8745eab46e464255 (patch)
tree3cd031e1733aa1e805379fb95fc2650410c35a91
parent32d43ebe193a50608c2c71bff9a8e990ae0c086e (diff)
Merged revisions 319142 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r319142 | mnicholson | 2011-05-16 10:53:26 -0500 (Mon, 16 May 2011) | 8 lines Make sure tcptls_session exists before dereferencing it. (closes issue #19192) Reported by: stknob Patches: 10-tcptls-unreachable-peer-segfault.patch uploaded by Chainsaw (license 723) Tested by: vois, Chainsaw ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@319143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0adb24bf9..099c8d2a1 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2758,7 +2758,7 @@ static void *_sip_tcp_helper_thread(struct sip_pvt *pvt, struct ast_tcptls_sessi
ast_debug(2, "Shutting down thread for %s server\n", tcptls_session->ssl ? "SSL" : "TCP");
cleanup:
- if (!tcptls_session->client && !authenticated) {
+ if (tcptls_session && !tcptls_session->client && !authenticated) {
ast_atomic_fetchadd_int(&unauth_sessions, -1);
}