Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Move rtfree to a common place
details: https://anonhg.NetBSD.org/src/rev/4603a35380fc
branches: trunk
changeset: 339844:4603a35380fc
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Thu Aug 13 07:59:05 2015 +0000
description:
Move rtfree to a common place
This change also plugs a missing rtfree on an error path.
diffstat:
sys/net/route.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 0221720d8b64 -r 4603a35380fc sys/net/route.c
--- a/sys/net/route.c Thu Aug 13 05:02:37 2015 +0000
+++ b/sys/net/route.c Thu Aug 13 07:59:05 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.146 2015/07/17 02:21:08 ozaki-r Exp $ */
+/* $NetBSD: route.c,v 1.147 2015/08/13 07:59:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -94,7 +94,7 @@
#include "opt_route.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.146 2015/07/17 02:21:08 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.147 2015/08/13 07:59:05 ozaki-r Exp $");
#include <sys/param.h>
#ifdef RTFLUSH_DEBUG
@@ -1041,7 +1041,6 @@
switch (cmd) {
case RTM_DELETE:
rt_newmsg(cmd, rt);
- rtfree(rt);
break;
case RTM_LLINFO_UPD:
RT_DPRINTF("%s: updating%s\n", __func__,
@@ -1061,7 +1060,6 @@
if (cmd == RTM_LLINFO_UPD && ifa->ifa_rtrequest != NULL)
ifa->ifa_rtrequest(RTM_LLINFO_UPD, rt, &info);
rt_newmsg(RTM_CHANGE, rt);
- rtfree(rt);
break;
case RTM_ADD:
if (rt->rt_ifa != ifa) {
@@ -1077,9 +1075,9 @@
ifa->ifa_rtrequest(RTM_ADD, rt, &info);
}
rt_newmsg(cmd, rt);
- rtfree(rt);
break;
}
+ rtfree(rt);
return error;
}
Home |
Main Index |
Thread Index |
Old Index