From: zhu qun-ying Date: Mon, 2 Jun 2014 13:38:52 +0000 (+0100) Subject: Free up s->d1->buffered_app_data.q properly. X-Git-Tag: OpenSSL_1_0_0m~8 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b79e6e3a276634582012d531f4150a5fcf84fab3;p=oweals%2Fopenssl.git Free up s->d1->buffered_app_data.q properly. PR#3286 (cherry picked from commit 71e95000afb2227fe5cac1c79ae884338bcd8d0b) --- diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 97f325f32c..ebee36840e 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -175,9 +175,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); } }