]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
check *libctx which is allocated by OSSL_LIB_CTX_new()
authorxkernel <xkernel.wang@foxmail.com>
Mon, 21 Feb 2022 07:29:25 +0000 (15:29 +0800)
committerPauli <pauli@openssl.org>
Tue, 22 Feb 2022 23:23:10 +0000 (10:23 +1100)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17740)

test/tls-provider.c

index 7bff6e74069fe44067f87657685b4de523ffcb33..c6585148543b331fe0b3db3b2c69aaa39d09dcb6 100644 (file)
@@ -840,6 +840,9 @@ int tls_provider_init(const OSSL_CORE_HANDLE *handle,
 {
     OSSL_LIB_CTX *libctx = OSSL_LIB_CTX_new();
 
+    if (libctx == NULL)
+        return 0;
+
     *provctx = libctx;
 
     /*