summaryrefslogtreecommitdiffstats
path: root/apps/genrsa.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2021-02-17 16:15:27 -0500
committerDmitry Belyavskiy <beldmit@gmail.com>2021-04-20 10:12:29 +0200
commit606a417fb2b6ce5d1d112f2f3f710c8085744627 (patch)
tree332af9e08a75b5f628f6786300d6ee43a816e964 /apps/genrsa.c
parentc39352e4e4952a9f4b2171134af0e015a4d40768 (diff)
Fetch and free cipher and md's
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/14219)
Diffstat (limited to 'apps/genrsa.c')
-rw-r--r--apps/genrsa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/genrsa.c b/apps/genrsa.c
index ab991d2385..ee68d67043 100644
--- a/apps/genrsa.c
+++ b/apps/genrsa.c
@@ -82,7 +82,7 @@ int genrsa_main(int argc, char **argv)
BIO *out = NULL;
EVP_PKEY *pkey = NULL;
EVP_PKEY_CTX *ctx = NULL;
- const EVP_CIPHER *enc = NULL;
+ EVP_CIPHER *enc = NULL;
int ret = 1, num = DEFBITS, private = 0, primes = DEFPRIMES;
unsigned long f4 = RSA_F4;
char *outfile = NULL, *passoutarg = NULL, *passout = NULL;
@@ -243,6 +243,7 @@ opthelp:
BN_GENCB_free(cb);
EVP_PKEY_CTX_free(ctx);
EVP_PKEY_free(pkey);
+ EVP_CIPHER_free(enc);
BIO_free_all(out);
release_engine(eng);
OPENSSL_free(passout);