summaryrefslogtreecommitdiffstats
path: root/apps/crl.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-04-29 11:29:50 +0100
committerMatt Caswell <matt@openssl.org>2016-04-29 16:47:41 +0100
commit7001571330ce2e31234660c10ef26089a07b17c1 (patch)
tree83f87c86e11d8461dc503cf8cc99d5e4fc261228 /apps/crl.c
parent138388fe33707529683e1a41b0fe47d60313e7c1 (diff)
Check for a NULL return value from a call to X509_STORE_CTX_new()
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/crl.c')
-rw-r--r--apps/crl.c2
1 files changed, 1 insertions, 1 deletions
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;
}