summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2011-12-06 12:53:27 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2011-12-06 12:53:27 +0000
commit7b27b1c024fe97955cf263f27c24e3322ba05709 (patch)
treeb62204aa69c0e562abec537182903cbe106a8b7e /sys/net
parentd075d4c0c03c7b0b88ad01e510a078ce52fa3282 (diff)
don't duplicate rtfree actions taken by rtrequest1() in rtdeletemsg()
testing sthen@ ok sthen@ henning@ dlg@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/route.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index 8e491f03043..082547d395d 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.133 2011/12/06 12:48:51 blambert Exp $ */
+/* $OpenBSD: route.c,v 1.134 2011/12/06 12:53:26 blambert Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -551,15 +551,10 @@ rtdeletemsg(struct rtentry *rt, u_int tableid)
info.rti_info[RTAX_GATEWAY] = rt->rt_gateway;
info.rti_flags = rt->rt_flags;
ifp = rt->rt_ifp;
- error = rtrequest1(RTM_DELETE, &info, rt->rt_priority, &rt, tableid);
+ error = rtrequest1(RTM_DELETE, &info, rt->rt_priority, NULL, tableid);
rt_missmsg(RTM_DELETE, &info, info.rti_flags, ifp, error, tableid);
- /* Adjust the refcount */
- if (error == 0 && rt->rt_refcnt <= 0) {
- rt->rt_refcnt++;
- rtfree(rt);
- }
return (error);
}