mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
Merge "tcptls: NULL-check the parameter of ast_ssl_teardown before accessing it." into 13
This commit is contained in:
@@ -1047,7 +1047,7 @@ int ast_ssl_setup(struct ast_tls_config *cfg)
|
|||||||
void ast_ssl_teardown(struct ast_tls_config *cfg)
|
void ast_ssl_teardown(struct ast_tls_config *cfg)
|
||||||
{
|
{
|
||||||
#ifdef DO_SSL
|
#ifdef DO_SSL
|
||||||
if (cfg->ssl_ctx) {
|
if (cfg && cfg->ssl_ctx) {
|
||||||
SSL_CTX_free(cfg->ssl_ctx);
|
SSL_CTX_free(cfg->ssl_ctx);
|
||||||
cfg->ssl_ctx = NULL;
|
cfg->ssl_ctx = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user