summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_blind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_blind.c')
-rw-r--r--src/lib/libcrypto/bn/bn_blind.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/lib/libcrypto/bn/bn_blind.c b/src/lib/libcrypto/bn/bn_blind.c
index 5f559da067..c842f76c6f 100644
--- a/src/lib/libcrypto/bn/bn_blind.c
+++ b/src/lib/libcrypto/bn/bn_blind.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_blind.c,v 1.13 2014/07/11 08:44:47 jsing Exp $ */ 1/* $OpenBSD: bn_blind.c,v 1.14 2014/07/12 16:03:36 miod Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -181,14 +181,10 @@ BN_BLINDING_free(BN_BLINDING *r)
181 if (r == NULL) 181 if (r == NULL)
182 return; 182 return;
183 183
184 if (r->A != NULL) 184 BN_clear_free(r->A);
185 BN_clear_free(r->A ); 185 BN_clear_free(r->Ai);
186 if (r->Ai != NULL) 186 BN_clear_free(r->e);
187 BN_clear_free(r->Ai); 187 BN_clear_free(r->mod);
188 if (r->e != NULL)
189 BN_clear_free(r->e );
190 if (r->mod != NULL)
191 BN_clear_free(r->mod);
192 free(r); 188 free(r);
193} 189}
194 190
@@ -341,8 +337,7 @@ BN_BLINDING_create_param(BN_BLINDING *b, const BIGNUM *e, BIGNUM *m,
341 goto err; 337 goto err;
342 338
343 if (e != NULL) { 339 if (e != NULL) {
344 if (ret->e != NULL) 340 BN_free(ret->e);
345 BN_free(ret->e);
346 ret->e = BN_dup(e); 341 ret->e = BN_dup(e);
347 } 342 }
348 if (ret->e == NULL) 343 if (ret->e == NULL)