summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-28 12:57:18 +0200
committerMaria Matejka <mq@ucw.cz>2022-07-11 16:07:09 +0200
commit61842ff3157d323f4d13b92effeca1c56c1dd262 (patch)
treeb3b8bb2c9c9491dc9b18da2b0c09c057a0ec280f /nest/rt-table.c
parentfd72c696784ba74e793db1fb7c44668c47a383b2 (diff)
Fixed bad import table attributes freeing
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c9
1 files changed, 8 insertions, 1 deletions
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();
}