Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto/dh
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-10-25 19:40:26 +0300
committerAdam Langley <alangley@gmail.com>2015-10-26 22:45:25 +0300
commit911cfb7e6ed4355cbf7099e5c743bdcc57e2b69c (patch)
treec7e7deafbc3ff863512ea8a6068b18b30506efc3 /crypto/dh
parent17dd904eb991cd88d44fee916cac5a2bf2f24c13 (diff)
Unnecessary NULL checks.
Missed a few the last time around. Change-Id: I42fd57566d64fa1c41cba14573742d42468cc07d Reviewed-on: https://boringssl-review.googlesource.com/6349 Reviewed-by: Adam Langley <alangley@gmail.com>
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/dh/dh.c b/crypto/dh/dh.c
index 87a640d9..ee6c9a02 100644
--- a/crypto/dh/dh.c
+++ b/crypto/dh/dh.c
@@ -129,15 +129,15 @@ void DH_free(DH *dh) {
CRYPTO_free_ex_data(&g_ex_data_class, dh, &dh->ex_data);
- if (dh->method_mont_p) BN_MONT_CTX_free(dh->method_mont_p);
- if (dh->p != NULL) BN_clear_free(dh->p);
- if (dh->g != NULL) BN_clear_free(dh->g);
- if (dh->q != NULL) BN_clear_free(dh->q);
- if (dh->j != NULL) BN_clear_free(dh->j);
- if (dh->seed) OPENSSL_free(dh->seed);
- if (dh->counter != NULL) BN_clear_free(dh->counter);
- if (dh->pub_key != NULL) BN_clear_free(dh->pub_key);
- if (dh->priv_key != NULL) BN_clear_free(dh->priv_key);
+ BN_MONT_CTX_free(dh->method_mont_p);
+ BN_clear_free(dh->p);
+ BN_clear_free(dh->g);
+ BN_clear_free(dh->q);
+ BN_clear_free(dh->j);
+ OPENSSL_free(dh->seed);
+ BN_clear_free(dh->counter);
+ BN_clear_free(dh->pub_key);
+ BN_clear_free(dh->priv_key);
CRYPTO_MUTEX_cleanup(&dh->method_mont_p_lock);
OPENSSL_free(dh);