summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r--crypto/bn/bn_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index 2c5e2b26f8..3e9ea8ef4c 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -246,7 +246,7 @@ void BN_free(BIGNUM *a)
if (a == NULL)
return;
bn_check_top(a);
- if ((a->d != NULL) && !(BN_get_flags(a, BN_FLG_STATIC_DATA)))
+ if (!BN_get_flags(a, BN_FLG_STATIC_DATA))
OPENSSL_free(a->d);
if (a->flags & BN_FLG_MALLOCED)
OPENSSL_free(a);
@@ -378,8 +378,7 @@ BIGNUM *bn_expand2(BIGNUM *b, int words)
BN_ULONG *a = bn_expand_internal(b, words);
if (!a)
return NULL;
- if (b->d)
- OPENSSL_free(b->d);
+ OPENSSL_free(b->d);
b->d = a;
b->dmax = words;
}