From cc3db42372df8be9ddfe6036931b6254f311e2b4 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sat, 7 Jun 2014 14:37:35 +0000 Subject: ssl3_free_digest_list() has its own NULL check. --- src/lib/libssl/s3_lib.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/libssl/s3_lib.c') diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 6165b2a120..3058b66a0d 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/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; -- cgit v1.2.3-55-g6feb