Return NULL if init_tls_client_context() fails.

Otherwise, we will call SSL_new with a freed SSL context.
Bug #970
This commit is contained in:
Todd C. Miller
2021-03-31 07:57:09 -06:00
parent 4f9d2374c8
commit 5a79841208

View File

@@ -1454,6 +1454,7 @@ init_tls_client_context(const char *ca_bundle_file, const char *cert_file, const
bad:
SSL_CTX_free(ctx);
ctx = NULL;
done:
debug_return_ptr(ctx);