diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-05-30 06:24:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2014-05-30 06:24:18 +0000 |
commit | d15ac4820e36f6e5302081a89c405ff5bff1922f (patch) | |
tree | 12e35379b916c7dbf46fb4d583d7aa102541ec7c /lib/libcrypto/rsa | |
parent | 92fe7f51d198ea62cc552bf356ca8d58fa48417f (diff) |
more: no need to null check before free; ok guenther
Diffstat (limited to 'lib/libcrypto/rsa')
-rw-r--r-- | lib/libcrypto/rsa/rsa_ameth.c | 2 | ||||
-rw-r--r-- | lib/libcrypto/rsa/rsa_oaep.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/rsa/rsa_ameth.c b/lib/libcrypto/rsa/rsa_ameth.c index f0a346a70ec..2c7e39bb1d3 100644 --- a/lib/libcrypto/rsa/rsa_ameth.c +++ b/lib/libcrypto/rsa/rsa_ameth.c @@ -248,7 +248,7 @@ static int do_rsa_print(BIO *bp, const RSA *x, int off, int priv) } ret=1; err: - if (m != NULL) free(m); + free(m); return(ret); } diff --git a/lib/libcrypto/rsa/rsa_oaep.c b/lib/libcrypto/rsa/rsa_oaep.c index a107e89b81c..53d35621a37 100644 --- a/lib/libcrypto/rsa/rsa_oaep.c +++ b/lib/libcrypto/rsa/rsa_oaep.c @@ -179,7 +179,7 @@ decoding_err: /* to avoid chosen ciphertext attacks, the error message should not reveal * which kind of decoding error happened */ RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); - if (db != NULL) free(db); + free(db); return -1; } |