[Asterisk-code-review] tcptls: NULL-check the parameter of ast ssl teardown before ... (asterisk[master])
Joshua Colp
asteriskteam at digium.com
Sun Oct 15 14:29:39 CDT 2017
Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6788 )
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
Joshua Colp: Approved for Submit
diff --git a/main/tcptls.c b/main/tcptls.c
index dbcff9d..a25e25b 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
@@ -500,7 +500,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/6788
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I327fc70db68eaaca5b50a15c7fd687fde79263d5
Gerrit-Change-Number: 6788
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
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-code-review/attachments/20171015/9289b98e/attachment.html>
More information about the asterisk-code-review
mailing list