summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/rsa/rsa_crpt.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-07-10 07:43:11 +0000
committerjsing <jsing@openbsd.org>2014-07-10 07:43:11 +0000
commit323e3475f1da3db6e3b7e4f8288ec466cec2ddcc (patch)
treedeaa0135b2ed87962dd5d5ec20a325746bd38f3e /lib/libcrypto/rsa/rsa_crpt.c
parentUse a while loop instead of an ifdowhile loop. (diff)
downloadwireguard-openbsd-323e3475f1da3db6e3b7e4f8288ec466cec2ddcc.tar.xz
wireguard-openbsd-323e3475f1da3db6e3b7e4f8288ec466cec2ddcc.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 'lib/libcrypto/rsa/rsa_crpt.c')
-rw-r--r--lib/libcrypto/rsa/rsa_crpt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libcrypto/rsa/rsa_crpt.c b/lib/libcrypto/rsa/rsa_crpt.c
index fb09d235e1e..c216c1bae47 100644
--- a/lib/libcrypto/rsa/rsa_crpt.c
+++ b/lib/libcrypto/rsa/rsa_crpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_crpt.c,v 1.6 2014/07/09 19:51:38 jsing Exp $ */
+/* $OpenBSD: rsa_crpt.c,v 1.7 2014/07/10 07:43:11 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -110,10 +110,8 @@ RSA_flags(const RSA *r)
void
RSA_blinding_off(RSA *rsa)
{
- if (rsa->blinding != NULL) {
- BN_BLINDING_free(rsa->blinding);
- rsa->blinding = NULL;
- }
+ BN_BLINDING_free(rsa->blinding);
+ rsa->blinding = NULL;
rsa->flags &= ~RSA_FLAG_BLINDING;
rsa->flags |= RSA_FLAG_NO_BLINDING;
}