diff options
author | icy17 <39425646+icy17@users.noreply.github.com> | 2023-07-29 04:25:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-28 23:25:04 +0300 |
commit | b2ae9258a339cbf6f36436d6ef3ec4a8e94a1c8e (patch) | |
tree | 81c036bfa7e94b046949c56c688d7bd1bb27fbf3 | |
parent | a615db0bc4fa088b6d530e58d66919a13d56026c (diff) |
fix potential crash bug. (#15605)
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
-rw-r--r-- | web/server/h2o/http_server.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/web/server/h2o/http_server.c b/web/server/h2o/http_server.c index 1f0a14ff29..9abb0ca050 100644 --- a/web/server/h2o/http_server.c +++ b/web/server/h2o/http_server.c @@ -73,6 +73,10 @@ static int ssl_init() #else accept_ctx.ssl_ctx = SSL_CTX_new(TLS_server_method()); #endif + if (!accept_ctx.ssl_ctx) { + netdata_log_error("Could not allocate a new SSL_CTX"); + return -1; + } SSL_CTX_set_options(accept_ctx.ssl_ctx, SSL_OP_NO_SSLv2); |