summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/d1_lib.c')
-rw-r--r--src/lib/libssl/d1_lib.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c
index cf4c5100d5..fe51769530 100644
--- a/src/lib/libssl/d1_lib.c
+++ b/src/lib/libssl/d1_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_lib.c,v 1.62 2022/10/02 16:36:41 jsing Exp $ */ 1/* $OpenBSD: d1_lib.c,v 1.63 2022/11/11 17:15:26 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -105,6 +105,23 @@ dtls1_new(SSL *s)
105} 105}
106 106
107static void 107static void
108dtls1_drain_rcontents(pqueue queue)
109{
110 DTLS1_RCONTENT_DATA_INTERNAL *rdata;
111 pitem *item;
112
113 if (queue == NULL)
114 return;
115
116 while ((item = pqueue_pop(queue)) != NULL) {
117 rdata = (DTLS1_RCONTENT_DATA_INTERNAL *)item->data;
118 tls_content_free(rdata->rcontent);
119 free(item->data);
120 pitem_free(item);
121 }
122}
123
124static void
108dtls1_drain_records(pqueue queue) 125dtls1_drain_records(pqueue queue)
109{ 126{
110 pitem *item; 127 pitem *item;
@@ -141,7 +158,7 @@ dtls1_clear_queues(SSL *s)
141 dtls1_drain_records(s->d1->unprocessed_rcds.q); 158 dtls1_drain_records(s->d1->unprocessed_rcds.q);
142 dtls1_drain_fragments(s->d1->buffered_messages); 159 dtls1_drain_fragments(s->d1->buffered_messages);
143 dtls1_drain_fragments(s->d1->sent_messages); 160 dtls1_drain_fragments(s->d1->sent_messages);
144 dtls1_drain_records(s->d1->buffered_app_data.q); 161 dtls1_drain_rcontents(s->d1->buffered_app_data.q);
145} 162}
146 163
147void 164void