Added comment for the frag->reassembly == NULL case as per feedback from Emilia
Reviewed-by: Emilia Käsper <emilia@openssl.org>
(Imported from upstream's ea7cb5397457c59554155935b677a1dab23bd864)
Change-Id: Idd5ed233028c42d2b921deb424381aad88a0aa84
Reviewed-on: https://boringssl-review.googlesource.com/1433
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index fef8b45..b0e749c 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -645,14 +645,14 @@
}
}
-
/* If message is already reassembled, this must be a
- * retransmit and can be dropped.
- */
+ * retransmit and can be dropped. In this case item != NULL and so frag
+ * does not need to be freed. */
if (frag->reassembly == NULL)
{
unsigned char devnull [256];
+ assert(item != NULL);
while (frag_len)
{
i = s->method->ssl_read_bytes(s,SSL3_RT_HANDSHAKE,