summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-06-07 14:14:14 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-06-07 14:14:14 +0000
commit73c1b68d37a64839b7f0e38b5674b20f2fb3db13 (patch)
tree42e4a2dd9a1620adb4c4f817be160ee59dcaed27
parent2a4c7be9e03b4902fd9aa64d0cb8817e519b2bd3 (diff)
ssl3_release_{read,write}_buffer() handle being called with NULL buffers,
so do not bother checking before calling.
-rw-r--r--lib/libssl/s3_lib.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libssl/s3_lib.c b/lib/libssl/s3_lib.c
index d8066720f9e..5ed0aee7d56 100644
--- a/lib/libssl/s3_lib.c
+++ b/lib/libssl/s3_lib.c
@@ -2328,10 +2328,9 @@ ssl3_free(SSL *s)
#endif
ssl3_cleanup_key_block(s);
- if (s->s3->rbuf.buf != NULL)
- ssl3_release_read_buffer(s);
- if (s->s3->wbuf.buf != NULL)
- ssl3_release_write_buffer(s);
+ ssl3_release_read_buffer(s);
+ ssl3_release_write_buffer(s);
+
free(s->s3->rrec.comp);
DH_free(s->s3->tmp.dh);
EC_KEY_free(s->s3->tmp.ecdh);