summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/req.c b/apps/req.c
index c4c9ba292c..3ce2b38496 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -663,6 +663,8 @@ int req_main(int argc, char **argv)
EVP_PKEY_CTX_set_cb(genctx, progress_cb);
pkey = app_keygen(genctx, keyalgstr, newkey_len, verbose);
+ if (pkey == NULL)
+ goto end;
EVP_PKEY_CTX_free(genctx);
genctx = NULL;