summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lib.c
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-01-07 20:15:59 +0100
committerBen Laurie <ben@openssl.org>1999-01-07 20:15:59 +0100
commite03ddfae7ea7c27193d3f7c0eaa1d01704647d77 (patch)
tree7cf2e8444b222a3a52c4735e0415916bb81c4494 /crypto/bn/bn_lib.c
parentFix DH key generation. (diff)
downloadopenssl-e03ddfae7ea7c27193d3f7c0eaa1d01704647d77.tar.xz
openssl-e03ddfae7ea7c27193d3f7c0eaa1d01704647d77.zip
Accept NULL in *_free.
Diffstat (limited to 'crypto/bn/bn_lib.c')
-rw-r--r--crypto/bn/bn_lib.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c
index c027d0b03e..d8d2c3297d 100644
--- a/crypto/bn/bn_lib.c
+++ b/crypto/bn/bn_lib.c
@@ -341,6 +341,9 @@ BN_CTX *c;
{
int i;
+ if(c == NULL)
+ return;
+
for (i=0; i<BN_CTX_NUM; i++)
BN_clear_free(&(c->bn[i]));
if (c->flags & BN_FLG_MALLOCED)