summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c
index c1575fe5e9..75a3604061 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -340,8 +340,12 @@ int MAIN(int argc, char **argv)
perror(p);
goto end;
}
- if ((ecdsa_params = PEM_read_bio_ECDSAParameters(in, NULL, NULL, NULL)) == NULL)
+ if ((ecdsa_params = ECDSA_new()) == NULL)
+ goto end;
+ if ((ecdsa_params->group = PEM_read_bio_ECPKParameters(in, NULL, NULL, NULL)) == NULL)
{
+ if (ecdsa_params)
+ ECDSA_free(ecdsa_params);
ERR_clear_error();
(void)BIO_reset(in);
if ((xtmp=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL)