diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2014-07-10 07:43:12 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2014-07-10 07:43:12 +0000 |
commit | 0b1190e280c7d12831f4591b7a323c165881239d (patch) | |
tree | 14eaaf5387d15a315527ace7d1cb605becebdcae /lib/libcrypto/rsa/rsa_chk.c | |
parent | 3a602a7fb8596fb1d403e5c779881b92e88c9f45 (diff) |
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_chk.c')
-rw-r--r-- | lib/libcrypto/rsa/rsa_chk.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/libcrypto/rsa/rsa_chk.c b/lib/libcrypto/rsa/rsa_chk.c index 0f9e0944db1..c247a8d80e8 100644 --- a/lib/libcrypto/rsa/rsa_chk.c +++ b/lib/libcrypto/rsa/rsa_chk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_chk.c,v 1.8 2014/07/09 19:51:38 jsing Exp $ */ +/* $OpenBSD: rsa_chk.c,v 1.9 2014/07/10 07:43:11 jsing Exp $ */ /* ==================================================================== * Copyright (c) 1999 The OpenSSL Project. All rights reserved. * @@ -52,7 +52,6 @@ #include <openssl/err.h> #include <openssl/rsa.h> - int RSA_check_key(const RSA *key) { @@ -203,17 +202,12 @@ RSA_check_key(const RSA *key) } err: - if (i != NULL) - BN_free(i); - if (j != NULL) - BN_free(j); - if (k != NULL) - BN_free(k); - if (l != NULL) - BN_free(l); - if (m != NULL) - BN_free(m); - if (ctx != NULL) - BN_CTX_free(ctx); + BN_free(i); + BN_free(j); + BN_free(k); + BN_free(l); + BN_free(m); + BN_CTX_free(ctx); + return (ret); } |