summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhu qun-ying <qunying@yahoo.com>2014-06-02 14:38:52 +0100
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-22 00:13:55 +0200
commit0d5a7ebd6109fe9fe9f5649a3f16dd56e262368c (patch)
tree9d0d2de145284b3eb0f640bd027fdb6a232f6e3d
parent716b36c2b1f66c939826a9437c70cf2f3b9116ff (diff)
downloadreplicant_openssl-0d5a7ebd6109fe9fe9f5649a3f16dd56e262368c.zip
replicant_openssl-0d5a7ebd6109fe9fe9f5649a3f16dd56e262368c.tar.gz
replicant_openssl-0d5a7ebd6109fe9fe9f5649a3f16dd56e262368c.tar.bz2
Free up s->d1->buffered_app_data.q properly.
PR#3286 (cherry picked from commit 71e95000afb2227fe5cac1c79ae884338bcd8d0b)
-rw-r--r--ssl/d1_lib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index 43d3d9e..cb7d825 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -176,9 +176,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);
}
}