0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 17:51:53 +00:00

Merge commit '6c058ae4' into thread-next-iface

This commit is contained in:
Maria Matejka 2023-04-14 13:43:32 +02:00
commit 90b9e37bc4

View File

@ -185,11 +185,18 @@ lp_flush(linpool *m)
{
struct lp_chunk *c;
/* Move ptr to the first chunk and free all large chunks */
/* Move ptr to the first chunk and free all other chunks */
m->current = c = m->first;
m->ptr = c ? c->data : NULL;
m->end = c ? c->data + LP_DATA_SIZE : NULL;
while (c && c->next)
{
struct lp_chunk *d = c->next;
c->next = d->next;
free_page(d);
}
while (c = m->first_large)
{
m->first_large = c->next;