From 4b1d2b368062898202f9ea453f96a62593f8ce19 Mon Sep 17 00:00:00 2001 From: Bret Lambert Date: Sat, 20 Mar 2010 10:43:12 +0000 Subject: Don't leak memory when resizing routing table array ok claudio@ --- sys/net/route.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3