Package: asterisk / 1:1.6.2.9-2+squeeze12

chan_sip_hotfix_for_AST-2011-005-p2 Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
From: Matthew Nicholson <mnicholson@digium.com>
Date: Mon May 16 15:51:53 2011 UTC 
Bug: https://issues.asterisk.org/view.php?id=19192
Subject: Make sure tcptls_session exists before dereferencing it.
Origin: http://svnview.digium.com/svn/asterisk/branches/1.6.2/channels/chan_sip.c?view=patch&r1=319141&r2=319140&pathrev=319141

--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3213,7 +3213,7 @@
 	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);
 	}