diff options
author | jsing <> | 2014-07-10 07:43:11 +0000 |
---|---|---|
committer | jsing <> | 2014-07-10 07:43:11 +0000 |
commit | a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750 (patch) | |
tree | 73c2d1cfd1c9669b272f8aeaa3441a982874c635 /src/lib/libcrypto/rsa/rsa_eay.c | |
parent | a056a5f9321e4e7d039f49d894e59dff155713aa (diff) | |
download | openbsd-a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750.tar.gz openbsd-a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750.tar.bz2 openbsd-a4e67b1c13f505b2c40c8ea01a2d2c2d80b07750.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 | } |