summaryrefslogtreecommitdiffstats
path: root/sysdep/unix
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2003-08-14 00:07:55 +0200
committerMartin Mares <mj@ucw.cz>2003-08-14 00:07:55 +0200
commitc197d44e1790ab1738cf9e438c2c91bd74e9b94e (patch)
tree69cea326ecb88a70f657fd98b613fd87879a66f3 /sysdep/unix
parent13b75bacf7221eb655dcbed54e3c3605bea5169e (diff)
downloadbird-c197d44e1790ab1738cf9e438c2c91bd74e9b94e.tar
bird-c197d44e1790ab1738cf9e438c2c91bd74e9b94e.zip
This probably IS the memory leak we're looking for. Alien routes weren't
correctly disposed of.
Diffstat (limited to 'sysdep/unix')
-rw-r--r--sysdep/unix/krt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c
index e648184..ff688b9 100644
--- a/sysdep/unix/krt.c
+++ b/sysdep/unix/krt.c
@@ -513,7 +513,10 @@ krt_got_route(struct krt_proto *p, rte *e)
if (KRT_CF->learn)
krt_learn_scan(p, e);
else
- krt_trace_in(p, e, "alien route, ignored");
+ {
+ krt_trace_in(p, e, "alien route, ignored");
+ rte_free(e);
+ }
return;
}
#endif
@@ -522,6 +525,7 @@ krt_got_route(struct krt_proto *p, rte *e)
{
/* Route to this destination was already seen. Strange, but it happens... */
krt_trace_in(p, e, "already seen");
+ rte_free(e);
return;
}