summaryrefslogtreecommitdiffstats
path: root/crypto/rsa/rsa_ameth.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 14:37:16 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 14:37:16 -0400
commit25aaa98aa249d26391c1994d2de449562c8b8b99 (patch)
tree6f83efd87fa9fd832e8a456e9686143a29f1dab3 /crypto/rsa/rsa_ameth.c
parent666964780a245c14e8f0eb6e13dd854a37387ea9 (diff)
free NULL cleanup -- coda
After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/rsa/rsa_ameth.c')
-rw-r--r--crypto/rsa/rsa_ameth.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c
index 9313c93d68..e9ccd7e41d 100644
--- a/crypto/rsa/rsa_ameth.c
+++ b/crypto/rsa/rsa_ameth.c
@@ -378,8 +378,7 @@ static int rsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
X509_ALGOR *maskHash;
pss = rsa_pss_decode(sigalg, &maskHash);
rv = rsa_pss_param_print(bp, pss, maskHash, indent);
- if (pss)
- RSA_PSS_PARAMS_free(pss);
+ RSA_PSS_PARAMS_free(pss);
X509_ALGOR_free(maskHash);
if (!rv)
return 0;
@@ -557,8 +556,7 @@ static ASN1_STRING *rsa_ctx_to_pss(EVP_PKEY_CTX *pkctx)
goto err;
rv = 1;
err:
- if (pss)
- RSA_PSS_PARAMS_free(pss);
+ RSA_PSS_PARAMS_free(pss);
if (rv)
return os;
ASN1_STRING_free(os);
@@ -896,8 +894,7 @@ static int rsa_cms_encrypt(CMS_RecipientInfo *ri)
os = NULL;
rv = 1;
err:
- if (oaep)
- RSA_OAEP_PARAMS_free(oaep);
+ RSA_OAEP_PARAMS_free(oaep);
ASN1_STRING_free(os);
return rv;
}