]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixed bad import table attributes freeing
authorMaria Matejka <mq@ucw.cz>
Tue, 28 Jun 2022 10:57:18 +0000 (12:57 +0200)
committerMaria Matejka <mq@ucw.cz>
Mon, 11 Jul 2022 14:07:09 +0000 (16:07 +0200)
nest/rt-table.c

index 7fcc43afcfb029fcba0df0a9488e87e6e15529c0..afa0ec5c898ba10eb0514e8b1fae3610713e3466 100644 (file)
@@ -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();
 }