Fixed memory leak due to incorrect freeing of DTLS reassembly bit mask
[openssl.git] / ssl / d1_lib.c
index 25c58a8af9ad32f12f7d3692b0bd32c27f4ca092..a593c7859e772c83c9fb929136695aa6ee6334c8 100644 (file)
@@ -187,16 +187,14 @@ static void dtls1_clear_queues(SSL *s)
     while( (item = pqueue_pop(s->d1->buffered_messages)) != NULL)
         {
         frag = (hm_fragment *)item->data;
-        OPENSSL_free(frag->fragment);
-        OPENSSL_free(frag);
+        dtls1_hm_fragment_free(frag);
         pitem_free(item);
         }
 
     while ( (item = pqueue_pop(s->d1->sent_messages)) != NULL)
         {
         frag = (hm_fragment *)item->data;
-        OPENSSL_free(frag->fragment);
-        OPENSSL_free(frag);
+        dtls1_hm_fragment_free(frag);
         pitem_free(item);
         }