diff options
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r-- | ssl/d1_lib.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index 3d27e3085818..c872cb659451 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -191,9 +191,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); } } @@ -217,6 +220,7 @@ void dtls1_free(SSL *s) pq_64bit_free(&(s->d1->next_bitmap.max_seq_num)); OPENSSL_free(s->d1); + s->d1 = NULL; } void dtls1_clear(SSL *s) |