From 8d215738a05350baa583c47a2c52371d9cff3197 Mon Sep 17 00:00:00 2001 From: xkernel Date: Mon, 21 Feb 2022 15:29:25 +0800 Subject: check *libctx which is allocated by OSSL_LIB_CTX_new() Reviewed-by: Dmitry Belyavskiy Reviewed-by: Matt Caswell Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/17740) --- test/tls-provider.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test') diff --git a/test/tls-provider.c b/test/tls-provider.c index 7bff6e7406..c658514854 100644 --- a/test/tls-provider.c +++ b/test/tls-provider.c @@ -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; /* -- cgit v1.2.3