summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2010-03-20 10:43:12 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2010-03-20 10:43:12 +0000
commit4b1d2b368062898202f9ea453f96a62593f8ce19 (patch)
treeffd8c6e0c93e3efb6838a4425d97778a2c401ca8
parent00ca6343c56e6f885229d08df29de34ba642cccc (diff)
Don't leak memory when resizing routing table array
ok claudio@
-rw-r--r--sys/net/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 9bea0705605..c46a192599d 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.115 2010/02/09 16:31:14 claudio Exp $ */
+/* $OpenBSD: route.c,v 1.116 2010/03/20 10:43:11 blambert Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -235,6 +235,7 @@ rtable_add(u_int id) /* must be called at splsoftnet */
bcopy(rt_tables, p, sizeof(void *) * (rtbl_id_max+1));
bcopy(rt_tab2dom, q, sizeof(u_int) * (rtbl_id_max+1));
free(rt_tables, M_RTABLE);
+ free(rt_tab2dom, M_RTABLE);
}
rt_tables = p;
rt_tab2dom = q;