Add a TODO for why init_buf isn't released post-handshake.
There is no good reason why this needs to be this way. Later work should make
this all use a much more appropriate design. In the meantime, leave a note here
so this does not look accidental.
Change-Id: I7599dea7a474f54e26d9ab175b0e3cada99a974d
Reviewed-on: https://boringssl-review.googlesource.com/7951
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c
index e2a4cff..19ad1f8 100644
--- a/ssl/d1_clnt.c
+++ b/ssl/d1_clnt.c
@@ -430,6 +430,10 @@
/* Remove write buffering now. */
ssl_free_wbio_buffer(ssl);
+ /* |init_buf| cannot be released because post-handshake retransmit
+ * relies on that buffer being available as scratch space.
+ *
+ * TODO(davidben): Fix this. */
ssl->init_num = 0;
ssl->s3->initial_handshake_complete = 1;
diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c
index bb339cb..9913e73 100644
--- a/ssl/d1_srvr.c
+++ b/ssl/d1_srvr.c
@@ -404,6 +404,10 @@
/* remove buffering on output */
ssl_free_wbio_buffer(ssl);
+ /* |init_buf| cannot be released because post-handshake retransmit
+ * relies on that buffer being available as scratch space.
+ *
+ * TODO(davidben): Fix this. */
ssl->init_num = 0;
ssl->s3->initial_handshake_complete = 1;