diff options
author | deraadt <> | 2014-05-30 06:24:17 +0000 |
---|---|---|
committer | deraadt <> | 2014-05-30 06:24:17 +0000 |
commit | fa03bdcd17251bec54215a778d2e211e7517a8d7 (patch) | |
tree | 378f1ca33779c5e85714a5e4979113c540782fad /src/lib/libcrypto/rsa | |
parent | abd9b10898e82011a65d8e8fca56bf56532edd69 (diff) | |
download | openbsd-fa03bdcd17251bec54215a778d2e211e7517a8d7.tar.gz openbsd-fa03bdcd17251bec54215a778d2e211e7517a8d7.tar.bz2 openbsd-fa03bdcd17251bec54215a778d2e211e7517a8d7.zip |
more: no need to null check before free; ok guenther
Diffstat (limited to 'src/lib/libcrypto/rsa')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 2 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_oaep.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index f0a346a70e..2c7e39bb1d 100644 --- a/src/lib/libcrypto/rsa/rsa_ameth.c +++ b/src/lib/libcrypto/rsa/rsa_ameth.c | |||
@@ -248,7 +248,7 @@ static int do_rsa_print(BIO *bp, const RSA *x, int off, int priv) | |||
248 | } | 248 | } |
249 | ret=1; | 249 | ret=1; |
250 | err: | 250 | err: |
251 | if (m != NULL) free(m); | 251 | free(m); |
252 | return(ret); | 252 | return(ret); |
253 | } | 253 | } |
254 | 254 | ||
diff --git a/src/lib/libcrypto/rsa/rsa_oaep.c b/src/lib/libcrypto/rsa/rsa_oaep.c index a107e89b81..53d35621a3 100644 --- a/src/lib/libcrypto/rsa/rsa_oaep.c +++ b/src/lib/libcrypto/rsa/rsa_oaep.c | |||
@@ -179,7 +179,7 @@ decoding_err: | |||
179 | /* to avoid chosen ciphertext attacks, the error message should not reveal | 179 | /* to avoid chosen ciphertext attacks, the error message should not reveal |
180 | * which kind of decoding error happened */ | 180 | * which kind of decoding error happened */ |
181 | RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); | 181 | RSAerr(RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP, RSA_R_OAEP_DECODING_ERROR); |
182 | if (db != NULL) free(db); | 182 | free(db); |
183 | return -1; | 183 | return -1; |
184 | } | 184 | } |
185 | 185 | ||