summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-03-25 11:31:18 -0400
committerRich Salz <rsalz@openssl.org>2015-03-25 11:31:18 -0400
commitca3a82c3b364e1e584546f0f3bbb938b0b472580 (patch)
tree06c73d297f19629c1bf56bbf06dd2d443d4ac78f /ssl/s3_lib.c
parent2011b169fa90edd4d986e7dbbd3d64587d316a22 (diff)
free NULL cleanup
This commit handles BIO_ACCEPT_free BIO_CB_FREE BIO_CONNECT_free BIO_free BIO_free_all BIO_vfree Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 9893930eef..bed4a4e72d 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3147,9 +3147,7 @@ void ssl3_free(SSL *s)
if (s->s3->tmp.ca_names != NULL)
sk_X509_NAME_pop_free(s->s3->tmp.ca_names, X509_NAME_free);
- if (s->s3->handshake_buffer) {
- BIO_free(s->s3->handshake_buffer);
- }
+ BIO_free(s->s3->handshake_buffer);
if (s->s3->handshake_dgst)
ssl3_free_digest_list(s);
#ifndef OPENSSL_NO_TLSEXT
@@ -3200,10 +3198,8 @@ void ssl3_clear(SSL *s)
rlen = s->s3->rbuf.len;
wlen = s->s3->wbuf.len;
init_extra = s->s3->init_extra;
- if (s->s3->handshake_buffer) {
- BIO_free(s->s3->handshake_buffer);
- s->s3->handshake_buffer = NULL;
- }
+ BIO_free(s->s3->handshake_buffer);
+ s->s3->handshake_buffer = NULL;
if (s->s3->handshake_dgst) {
ssl3_free_digest_list(s);
}