[asterisk-commits] tcptls: NULL-check the parameter of ast ssl teardown before ... (asterisk[13])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Oct 15 13:53:45 CDT 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6789 )

Change subject: tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it.
......................................................................

tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it.

This avoids a crash on stopping a chan_sip which failed to start its TLS server.

ASTERISK-27339 #close

Change-Id: I327fc70db68eaaca5b50a15c7fd687fde79263d5
---
M main/tcptls.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Corey Farrell: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/main/tcptls.c b/main/tcptls.c
index 820a03e..e8ce2ce 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -1047,7 +1047,7 @@
 void ast_ssl_teardown(struct ast_tls_config *cfg)
 {
 #ifdef DO_SSL
-	if (cfg->ssl_ctx) {
+	if (cfg && cfg->ssl_ctx) {
 		SSL_CTX_free(cfg->ssl_ctx);
 		cfg->ssl_ctx = NULL;
 	}

-- 
To view, visit https://gerrit.asterisk.org/6789
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: I327fc70db68eaaca5b50a15c7fd687fde79263d5
Gerrit-Change-Number: 6789
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20171015/adedfe72/attachment.html>


More information about the asterisk-commits mailing list