aboutsummaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-03-28 10:54:15 -0400
committerRich Salz <rsalz@openssl.org>2015-03-28 10:54:15 -0400
commitc5ba2d990420e1778ca4a90bf882e0f806404af0 (patch)
tree61641d19bea624b7fa523162f0ebb0d5e2fccf55 /apps/req.c
parent33b188a8e82df57208ec8263c263f8b6f47e8255 (diff)
downloadopenssl-c5ba2d990420e1778ca4a90bf882e0f806404af0.tar.gz
free NULL cleanup
EVP_.*free; this gets: EVP_CIPHER_CTX_free EVP_PKEY_CTX_free EVP_PKEY_asn1_free EVP_PKEY_asn1_set_free EVP_PKEY_free EVP_PKEY_free_it EVP_PKEY_meth_free; and also EVP_CIPHER_CTX_cleanup Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/apps/req.c b/apps/req.c
index 231535bfaf..3cedf2c8a6 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -874,9 +874,9 @@ int MAIN(int argc, char **argv)
if (pkey == NULL) {
pkey = X509_REQ_get_pubkey(req);
- tmp = 1;
if (pkey == NULL)
goto end;
+ tmp = 1;
}
i = X509_REQ_verify(req, pkey);
@@ -1013,8 +1013,7 @@ int MAIN(int argc, char **argv)
BIO_free(in);
BIO_free_all(out);
EVP_PKEY_free(pkey);
- if (genctx)
- EVP_PKEY_CTX_free(genctx);
+ EVP_PKEY_CTX_free(genctx);
if (pkeyopts)
sk_OPENSSL_STRING_free(pkeyopts);
if (sigopts)