From 61842ff3157d323f4d13b92effeca1c56c1dd262 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Tue, 28 Jun 2022 12:57:18 +0200 Subject: Fixed bad import table attributes freeing --- nest/rt-table.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nest/rt-table.c') diff --git a/nest/rt-table.c b/nest/rt-table.c index 7fcc43af..afa0ec5c 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -1627,7 +1627,14 @@ rte_update(struct channel *c, const net_addr *n, rte *new, struct rte_src *src) /* Now the route attributes are kept by the in-table cached version * and we may drop the local handle */ if (new && (c->in_keep & RIK_PREFILTER)) - ea_free(new->attrs); + { + /* There may be some updates on top of the original attribute block */ + ea_list *a = new->attrs; + while (a->next) + a = a->next; + + ea_free(a); + } rte_update_unlock(); } -- cgit v1.2.3