From fb5cd202364ad6045c773d017984ef50eab23073 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Fri, 20 Jun 2014 12:00:00 -0700 Subject: [PATCH] Free up s->d1->buffered_app_data.q properly. PR#3286 (Imported from upstream's d52eb82781eff1f8245ae9c16c84db765f037cbe) --- ssl/d1_lib.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 4dc3a2bc..d039346b 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -205,9 +205,12 @@ static void dtls1_clear_queues(SSL *s) while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) { - frag = (hm_fragment *)item->data; - OPENSSL_free(frag->fragment); - OPENSSL_free(frag); + rdata = (DTLS1_RECORD_DATA *) item->data; + if (rdata->rbuf.buf) + { + OPENSSL_free(rdata->rbuf.buf); + } + OPENSSL_free(item->data); pitem_free(item); } }