Blame SOURCES/openssl-1.0.1e-cve-2014-8176.patch

5c1a6c
From bcc311668ede6ffdcd6dc5a65454a548b5404fcc Mon Sep 17 00:00:00 2001
5c1a6c
From: zhu qun-ying <qunying@yahoo.com>
5c1a6c
Date: Mon, 2 Jun 2014 14:38:52 +0100
5c1a6c
Subject: [PATCH] Free up s->d1->buffered_app_data.q properly.
5c1a6c
5c1a6c
PR#3286
5c1a6c
(cherry picked from commit 71e95000afb2227fe5cac1c79ae884338bcd8d0b)
5c1a6c
---
5c1a6c
 ssl/d1_lib.c | 9 ++++++---
5c1a6c
 1 file changed, 6 insertions(+), 3 deletions(-)
5c1a6c
5c1a6c
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
5c1a6c
index 106939f..6bde16f 100644
5c1a6c
--- a/ssl/d1_lib.c
5c1a6c
+++ b/ssl/d1_lib.c
5c1a6c
@@ -176,9 +176,12 @@ static void dtls1_clear_queues(SSL *s)
5c1a6c
 
5c1a6c
 	while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL)
5c1a6c
 		{
5c1a6c
-		frag = (hm_fragment *)item->data;
5c1a6c
-		OPENSSL_free(frag->fragment);
5c1a6c
-		OPENSSL_free(frag);
5c1a6c
+		rdata = (DTLS1_RECORD_DATA *) item->data;
5c1a6c
+		if (rdata->rbuf.buf)
5c1a6c
+			{
5c1a6c
+			OPENSSL_free(rdata->rbuf.buf);
5c1a6c
+			}
5c1a6c
+		OPENSSL_free(item->data);
5c1a6c
 		pitem_free(item);
5c1a6c
 		}
5c1a6c
 	}
5c1a6c
-- 
5c1a6c
2.1.0
5c1a6c