From 7001571330ce2e31234660c10ef26089a07b17c1 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 29 Apr 2016 11:29:50 +0100 Subject: [PATCH] Check for a NULL return value from a call to X509_STORE_CTX_new() Reviewed-by: Rich Salz --- apps/crl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/crl.c b/apps/crl.c index 915c9ac741..d3fd4162c4 100644 --- a/apps/crl.c +++ b/apps/crl.c @@ -244,7 +244,7 @@ int crl_main(int argc, char **argv) if (lookup == NULL) goto end; ctx = X509_STORE_CTX_new(); - if (!X509_STORE_CTX_init(ctx, store, NULL, NULL)) { + if (ctx == NULL || !X509_STORE_CTX_init(ctx, store, NULL, NULL)) { BIO_printf(bio_err, "Error initialising X509 store\n"); goto end; } -- 2.25.1