aboutsummaryrefslogtreecommitdiff
path: root/crypto/bn/bn_blind.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2018-03-27 16:25:08 -0400
committerRich Salz <rsalz@openssl.org>2018-03-27 16:25:08 -0400
commite6e9170d6e28038768895e1af18e3aad8093bf4b (patch)
tree62f594f0968ff8d6c27795377a102e4aab373b00 /crypto/bn/bn_blind.c
parent98c03302fb7b855647aa14022f61f5fb272e514a (diff)
downloadopenssl-e6e9170d6e28038768895e1af18e3aad8093bf4b.zip
openssl-e6e9170d6e28038768895e1af18e3aad8093bf4b.tar.gz
openssl-e6e9170d6e28038768895e1af18e3aad8093bf4b.tar.bz2
Allow NULL for some _free routines.
Based on the description in https://github.com/openssl/openssl/pull/5757, this re-implements the "allow NULL to be passed" behavior of a number of xxx_free routines. I also fixed up some egregious formatting errors that were nearby. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5761)
Diffstat (limited to 'crypto/bn/bn_blind.c')
-rw-r--r--crypto/bn/bn_blind.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c
index 8bd6156..985d3ef 100644
--- a/crypto/bn/bn_blind.c
+++ b/crypto/bn/bn_blind.c
@@ -80,6 +80,8 @@ BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod)
void BN_BLINDING_free(BN_BLINDING *r)
{
+ if (r == NULL)
+ return;
BN_free(r->A);
BN_free(r->Ai);
BN_free(r->e);