diff options
author | Ben Laurie <ben@openssl.org> | 1999-01-07 19:15:59 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 1999-01-07 19:15:59 +0000 |
commit | e03ddfae7ea7c27193d3f7c0eaa1d01704647d77 (patch) | |
tree | 7cf2e8444b222a3a52c4735e0415916bb81c4494 /ssl | |
parent | 6fa89f94c4452be54577eb071891d77c9e2abe16 (diff) | |
download | openssl-e03ddfae7ea7c27193d3f7c0eaa1d01704647d77.tar.gz |
Accept NULL in *_free.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s2_lib.c | 3 | ||||
-rw-r--r-- | ssl/s3_enc.c | 1 | ||||
-rw-r--r-- | ssl/s3_lib.c | 3 | ||||
-rw-r--r-- | ssl/ssl_cert.c | 3 | ||||
-rw-r--r-- | ssl/ssl_comp.c | 3 | ||||
-rw-r--r-- | ssl/ssl_lib.c | 3 | ||||
-rw-r--r-- | ssl/ssl_sess.c | 3 |
7 files changed, 19 insertions, 0 deletions
diff --git a/ssl/s2_lib.c b/ssl/s2_lib.c index 51f686128f..097c35ee68 100644 --- a/ssl/s2_lib.c +++ b/ssl/s2_lib.c @@ -257,6 +257,9 @@ SSL *s; { SSL2_CTX *s2; + if(s == NULL) + return; + s2=s->s2; if (s2->rbuf != NULL) Free(s2->rbuf); if (s2->wbuf != NULL) Free(s2->wbuf); diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c index 116b096155..ea8e39ef06 100644 --- a/ssl/s3_enc.c +++ b/ssl/s3_enc.c @@ -208,6 +208,7 @@ int which; p=s->s3->tmp.key_block; i=EVP_MD_size(m); + // Should be j=exp?min(5,EVP_CIPHER_key_length(c)):EVP_CIPHER_key_length(c); ?? - Ben 30/12/98 j=(exp)?5:EVP_CIPHER_key_length(c); k=EVP_CIPHER_iv_length(c); if ( (which == SSL3_CHANGE_CIPHER_CLIENT_WRITE) || diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c index a523207a9f..f15bb2438a 100644 --- a/ssl/s3_lib.c +++ b/ssl/s3_lib.c @@ -456,6 +456,9 @@ err: void ssl3_free(s) SSL *s; { + if(s == NULL) + return; + ssl3_cleanup_key_block(s); if (s->s3->rbuf.buf != NULL) Free(s->s3->rbuf.buf); diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 1bff91eaa8..7d4531d808 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -105,6 +105,9 @@ CERT *c; { int i; + if(c == NULL) + return; + i=CRYPTO_add(&c->references,-1,CRYPTO_LOCK_SSL_CERT); #ifdef REF_PRINT REF_PRINT("CERT",c); diff --git a/ssl/ssl_comp.c b/ssl/ssl_comp.c index 7724ff5672..1593afb806 100644 --- a/ssl/ssl_comp.c +++ b/ssl/ssl_comp.c @@ -361,6 +361,9 @@ SSL_SESSION *ss; { int i; + if(ss == NULL) + return; + i=CRYPTO_add(&ss->references,-1,CRYPTO_LOCK_SSL_SESSION); #ifdef REF_PRINT REF_PRINT("SSL_SESSION",ss); diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index e56233075e..9e578fd738 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -203,6 +203,9 @@ SSL *s; { int i; + if(s == NULL) + return; + i=CRYPTO_add(&s->references,-1,CRYPTO_LOCK_SSL); #ifdef REF_PRINT REF_PRINT("SSL",s); diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index d4978a7d50..95cd7fed8a 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -363,6 +363,9 @@ SSL_SESSION *ss; { int i; + if(ss == NULL) + return; + i=CRYPTO_add(&ss->references,-1,CRYPTO_LOCK_SSL_SESSION); #ifdef REF_PRINT REF_PRINT("SSL_SESSION",ss); |