summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-04 20:46:30 +0200
committerMartin Mares <mj@ucw.cz>2000-06-04 20:46:30 +0200
commitf7667ba1c4c7a35266ae5018b059a14a01f7f907 (patch)
treec6d0b5aeec0b9b2ab745357f0c05cc35d833e72b /filter
parent7722938d63d206ebc0e1da732009e1e9f2cd9d72 (diff)
downloadbird-f7667ba1c4c7a35266ae5018b059a14a01f7f907.tar
bird-f7667ba1c4c7a35266ae5018b059a14a01f7f907.zip
When cloning a rte and replacing its rta, remember to free the old one
so that we don't leak memory. Thanks go to the resource tracking system for quickly discovering the source of leakages.
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 776ad55..c12435c 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -215,6 +215,7 @@ rta_cow(void)
memcpy(f_rta_copy, (*f_rte)->attrs, sizeof(rta));
f_rta_copy->aflags = 0;
*f_rte = rte_cow(*f_rte);
+ rta_free((*f_rte)->attrs);
(*f_rte)->attrs = f_rta_copy;
}
}