]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
This was a potential memory leak, but not the one Feela observed.
authorMartin Mares <mj@ucw.cz>
Wed, 13 Aug 2003 19:31:22 +0000 (19:31 +0000)
committerMartin Mares <mj@ucw.cz>
Wed, 13 Aug 2003 19:31:22 +0000 (19:31 +0000)
This one could happen when an import filter of some protocol modified
the rte (so that it would be rte_cow()ed) and later rejected it.

nest/rt-table.c

index 82acea061b35f2feb04cb43fdc2a05f709063c17..7d8894d1cdb40efc3e6caaa31e52d47d163caa6c 100644 (file)
@@ -184,6 +184,8 @@ do_rte_announce(struct announce_hook *a, net *net, rte *new, rte *old, ea_list *
               p->out_filter && f_run(p->out_filter, &new, &tmpa, rte_update_pool, FF_FORCE_TMPATTR) > F_ACCEPT)
        {
          rte_trace_out(D_FILTERS, p, new, "filtered out");
+         if (new != new0)
+           rte_free(new);
          new = NULL;
        }
     }