]> granicus.if.org Git - openssl/commitdiff
remove unnecessary NULL checks
authorDr. Stephen Henson <steve@openssl.org>
Sat, 20 Jun 2015 14:37:22 +0000 (15:37 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 21 Jun 2015 14:29:22 +0000 (15:29 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
ssl/s3_enc.c
ssl/s3_lib.c

index dd93e251ae727fc4139f2d3224c873e06bcb1ef5..bde19e1fb8ad3bc6a9bf0a502d46d230620f8f32 100644 (file)
@@ -477,8 +477,7 @@ void ssl3_cleanup_key_block(SSL *s)
 void ssl3_init_finished_mac(SSL *s)
 {
     BIO_free(s->s3->handshake_buffer);
-    if (s->s3->handshake_dgst)
-        ssl3_free_digest_list(s);
+    ssl3_free_digest_list(s);
     s->s3->handshake_buffer = BIO_new(BIO_s_mem());
     (void)BIO_set_close(s->s3->handshake_buffer, BIO_CLOSE);
 }
index 878464234bff49fa402e8856399f6f8f9cda1620..03078016e694b534fc1a794213767239bd0a3a07 100644 (file)
@@ -2906,8 +2906,7 @@ void ssl3_free(SSL *s)
     OPENSSL_clear_free(s->s3->tmp.pms, s->s3->tmp.pmslen);
     OPENSSL_free(s->s3->tmp.peer_sigalgs);
     BIO_free(s->s3->handshake_buffer);
-    if (s->s3->handshake_dgst)
-        ssl3_free_digest_list(s);
+    ssl3_free_digest_list(s);
     OPENSSL_free(s->s3->alpn_selected);
 
 #ifndef OPENSSL_NO_SRP
@@ -2943,9 +2942,7 @@ void ssl3_clear(SSL *s)
     init_extra = s->s3->init_extra;
     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);
 
     if (s->s3->alpn_selected) {
         OPENSSL_free(s->s3->alpn_selected);