diff options
author | jsing <> | 2014-07-10 07:43:11 +0000 |
---|---|---|
committer | jsing <> | 2014-07-10 07:43:11 +0000 |
commit | 40e53c5982a60d9fb38f2df6ac78e7482219fc17 (patch) | |
tree | 73c2d1cfd1c9669b272f8aeaa3441a982874c635 /src/lib/libcrypto/rsa/rsa_eay.c | |
parent | ec8c499ef7f0ca14b52a751e7d060abd044b3472 (diff) | |
download | openbsd-40e53c5982a60d9fb38f2df6ac78e7482219fc17.tar.gz openbsd-40e53c5982a60d9fb38f2df6ac78e7482219fc17.tar.bz2 openbsd-40e53c5982a60d9fb38f2df6ac78e7482219fc17.zip |
BN_free, BN_clear_free, BN_CTX_free, BN_BLINDING_free and BN_MONT_CTX_free
all have implicit NULL checks, so we do not need them here.
ok miod@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_eay.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_eay.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_eay.c b/src/lib/libcrypto/rsa/rsa_eay.c index ede772cb83..9b390fb8c0 100644 --- a/src/lib/libcrypto/rsa/rsa_eay.c +++ b/src/lib/libcrypto/rsa/rsa_eay.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_eay.c,v 1.31 2014/07/09 19:51:38 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_eay.c,v 1.32 2014/07/10 07:43:11 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -898,12 +898,9 @@ RSA_eay_init(RSA *rsa) | |||
898 | static int | 898 | static int |
899 | RSA_eay_finish(RSA *rsa) | 899 | RSA_eay_finish(RSA *rsa) |
900 | { | 900 | { |
901 | if (rsa->_method_mod_n != NULL) | 901 | BN_MONT_CTX_free(rsa->_method_mod_n); |
902 | BN_MONT_CTX_free(rsa->_method_mod_n); | 902 | BN_MONT_CTX_free(rsa->_method_mod_p); |
903 | if (rsa->_method_mod_p != NULL) | 903 | BN_MONT_CTX_free(rsa->_method_mod_q); |
904 | BN_MONT_CTX_free(rsa->_method_mod_p); | ||
905 | if (rsa->_method_mod_q != NULL) | ||
906 | BN_MONT_CTX_free(rsa->_method_mod_q); | ||
907 | 904 | ||
908 | return 1; | 905 | return 1; |
909 | } | 906 | } |