Fixed memory leak due to incorrect freeing of DTLS reassembly bit mask
PR#3608 Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
3a0765882c
commit
8a35dbb6d8
3 changed files with 4 additions and 6 deletions
|
@ -211,8 +211,7 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly)
|
||||||
return frag;
|
return frag;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void dtls1_hm_fragment_free(hm_fragment *frag)
|
||||||
dtls1_hm_fragment_free(hm_fragment *frag)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (frag->msg_header.is_ccs)
|
if (frag->msg_header.is_ccs)
|
||||||
|
|
|
@ -187,16 +187,14 @@ static void dtls1_clear_queues(SSL *s)
|
||||||
while( (item = pqueue_pop(s->d1->buffered_messages)) != NULL)
|
while( (item = pqueue_pop(s->d1->buffered_messages)) != NULL)
|
||||||
{
|
{
|
||||||
frag = (hm_fragment *)item->data;
|
frag = (hm_fragment *)item->data;
|
||||||
OPENSSL_free(frag->fragment);
|
dtls1_hm_fragment_free(frag);
|
||||||
OPENSSL_free(frag);
|
|
||||||
pitem_free(item);
|
pitem_free(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ( (item = pqueue_pop(s->d1->sent_messages)) != NULL)
|
while ( (item = pqueue_pop(s->d1->sent_messages)) != NULL)
|
||||||
{
|
{
|
||||||
frag = (hm_fragment *)item->data;
|
frag = (hm_fragment *)item->data;
|
||||||
OPENSSL_free(frag->fragment);
|
dtls1_hm_fragment_free(frag);
|
||||||
OPENSSL_free(frag);
|
|
||||||
pitem_free(item);
|
pitem_free(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1219,6 +1219,7 @@ int dtls1_is_timer_expired(SSL *s);
|
||||||
void dtls1_double_timeout(SSL *s);
|
void dtls1_double_timeout(SSL *s);
|
||||||
int dtls1_send_newsession_ticket(SSL *s);
|
int dtls1_send_newsession_ticket(SSL *s);
|
||||||
unsigned int dtls1_min_mtu(void);
|
unsigned int dtls1_min_mtu(void);
|
||||||
|
void dtls1_hm_fragment_free(hm_fragment *frag);
|
||||||
|
|
||||||
/* some client-only functions */
|
/* some client-only functions */
|
||||||
int ssl3_client_hello(SSL *s);
|
int ssl3_client_hello(SSL *s);
|
||||||
|
|
Loading…
Reference in a new issue