Fixed memory leak due to incorrect freeing of DTLS reassembly bit mask
PR#3608 (Imported from upstream's 8a35dbb6d89a16d792b79b157b3e89443639ec94.) Change-Id: Iab9d91f9b96793f2275a23770f1275ff4edf0386 Reviewed-on: https://boringssl-review.googlesource.com/2476 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
e518f65d2c
commit
83abdd6e58
@ -214,8 +214,7 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
|
||||
return frag;
|
||||
}
|
||||
|
||||
static void
|
||||
dtls1_hm_fragment_free(hm_fragment *frag)
|
||||
void dtls1_hm_fragment_free(hm_fragment *frag)
|
||||
{
|
||||
|
||||
if (frag->msg_header.is_ccs)
|
||||
|
@ -192,16 +192,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);
|
||||
}
|
||||
|
||||
|
@ -929,6 +929,7 @@ void dtls1_stop_timer(SSL *s);
|
||||
int dtls1_is_timer_expired(SSL *s);
|
||||
void dtls1_double_timeout(SSL *s);
|
||||
unsigned int dtls1_min_mtu(void);
|
||||
void dtls1_hm_fragment_free(hm_fragment *frag);
|
||||
|
||||
/* some client-only functions */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user