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

This commit is contained in:
Joshua Colp
2017-10-15 14:29:39 -05:00
committed by Gerrit Code Review
+1 -1
View File
@@ -500,7 +500,7 @@ int ast_ssl_setup(struct ast_tls_config *cfg)
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;
}