summaryrefslogtreecommitdiff
path: root/crypto/bio
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-01-07 19:15:59 +0000
committerBen Laurie <ben@openssl.org>1999-01-07 19:15:59 +0000
commite03ddfae7ea7c27193d3f7c0eaa1d01704647d77 (patch)
tree7cf2e8444b222a3a52c4735e0415916bb81c4494 /crypto/bio
parent6fa89f94c4452be54577eb071891d77c9e2abe16 (diff)
downloadopenssl-new-e03ddfae7ea7c27193d3f7c0eaa1d01704647d77.tar.gz
Accept NULL in *_free.
Diffstat (limited to 'crypto/bio')
-rw-r--r--crypto/bio/b_sock.c3
-rw-r--r--crypto/bio/bss_acpt.c3
-rw-r--r--crypto/bio/bss_conn.c3
3 files changed, 9 insertions, 0 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index 2c36150b9b..402439cc2e 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -310,6 +310,9 @@ struct hostent *a;
{
int i;
+ if(a == NULL)
+ return;
+
if (a->h_aliases != NULL)
{
for (i=0; a->h_aliases[i] != NULL; i++)
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c
index 872807d863..ecdd1709d1 100644
--- a/crypto/bio/bss_acpt.c
+++ b/crypto/bio/bss_acpt.c
@@ -173,6 +173,9 @@ BIO_ACCEPT *BIO_ACCEPT_new()
void BIO_ACCEPT_free(a)
BIO_ACCEPT *a;
{
+ if(a == NULL)
+ return;
+
if (a->param_addr != NULL) Free(a->param_addr);
if (a->addr != NULL) Free(a->addr);
if (a->bio_chain != NULL) BIO_free(a->bio_chain);
diff --git a/crypto/bio/bss_conn.c b/crypto/bio/bss_conn.c
index 3ec1388f2e..b90fea1a3a 100644
--- a/crypto/bio/bss_conn.c
+++ b/crypto/bio/bss_conn.c
@@ -357,6 +357,9 @@ BIO_CONNECT *BIO_CONNECT_new()
void BIO_CONNECT_free(a)
BIO_CONNECT *a;
{
+ if(a == NULL)
+ return;
+
if (a->param_hostname != NULL)
Free(a->param_hostname);
if (a->param_port != NULL)