summaryrefslogtreecommitdiff
path: root/lib/libssl/s3_lib.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-06-07 14:37:36 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-06-07 14:37:36 +0000
commit541f17aa0786842509821e76e2188e7cc941d600 (patch)
treebdaeb3a773bfceb36cbe606d8250e49f38f1606a /lib/libssl/s3_lib.c
parent2a5558e2e49b5271273ed8ac85ab022f4112166b (diff)
ssl3_free_digest_list() has its own NULL check.
Diffstat (limited to 'lib/libssl/s3_lib.c')
-rw-r--r--lib/libssl/s3_lib.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index 6165b2a1207..3058b66a0d9 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -2338,8 +2338,7 @@ ssl3_free(SSL *s)
if (s->s3->tmp.ca_names != NULL)
sk_X509_NAME_pop_free(s->s3->tmp.ca_names, X509_NAME_free);
BIO_free(s->s3->handshake_buffer);
- if (s->s3->handshake_dgst)
- ssl3_free_digest_list(s);
+ ssl3_free_digest_list(s);
OPENSSL_cleanse(s->s3, sizeof *s->s3);
free(s->s3);
s->s3 = NULL;
@@ -2382,9 +2381,8 @@ ssl3_clear(SSL *s)
BIO_free(s->s3->handshake_buffer);
s->s3->handshake_buffer = NULL;
}
- if (s->s3->handshake_dgst) {
- ssl3_free_digest_list(s);
- }
+ ssl3_free_digest_list(s);
+
memset(s->s3, 0, sizeof *s->s3);
s->s3->rbuf.buf = rp;
s->s3->wbuf.buf = wp;