Free up s->d1->buffered_app_data.q properly.

PR#3286

(Imported from upstream's d52eb82781eff1f8245ae9c16c84db765f037cbe)
This commit is contained in:
Adam Langley 2014-06-20 12:00:00 -07:00
parent f10a63b050
commit fb5cd20236

View File

@ -205,9 +205,12 @@ static void dtls1_clear_queues(SSL *s)
while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL) while ( (item = pqueue_pop(s->d1->buffered_app_data.q)) != NULL)
{ {
frag = (hm_fragment *)item->data; rdata = (DTLS1_RECORD_DATA *) item->data;
OPENSSL_free(frag->fragment); if (rdata->rbuf.buf)
OPENSSL_free(frag); {
OPENSSL_free(rdata->rbuf.buf);
}
OPENSSL_free(item->data);
pitem_free(item); pitem_free(item);
} }
} }