From a97299020b27894e3390ecc52d6f7a4e2c55d818 Mon Sep 17 00:00:00 2001 From: SoniEx2 Date: Thu, 27 May 2021 22:31:51 -0300 Subject: Handle SSL_CTX_new failure --- src/common/ssl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/common/ssl.c') diff --git a/src/common/ssl.c b/src/common/ssl.c index 0eb78bd7..d33e8fd2 100644 --- a/src/common/ssl.c +++ b/src/common/ssl.c @@ -87,6 +87,7 @@ _SSL_context_init (void (*info_cb_func)) SSLeay_add_ssl_algorithms (); SSL_load_error_strings (); ctx = SSL_CTX_new (SSLv23_client_method ()); + if (!ctx) return(ctx); SSL_CTX_set_session_cache_mode (ctx, SSL_SESS_CACHE_BOTH); SSL_CTX_set_timeout (ctx, 300); -- cgit 1.4.1