diff options
author | ru <ru@FreeBSD.org> | 2002-12-25 10:21:02 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-12-25 10:21:02 +0000 |
commit | 2719b5ea8cf3644f875ec6613f32325ff39ad4fe (patch) | |
tree | f8da1f036cd1db39f17ea82b59d8c9fc9ac6dabf /sys/net/rtsock.c | |
parent | 94490dce08e3e41b8f099a608f0151bd9f408fc0 (diff) | |
download | FreeBSD-src-2719b5ea8cf3644f875ec6613f32325ff39ad4fe.zip FreeBSD-src-2719b5ea8cf3644f875ec6613f32325ff39ad4fe.tar.gz |
If the caller of rtrequest*(RTM_DELETE, ...) asked for a copy of
the entry being removed (ret_nrt != NULL), increment the entry's
rt_refcnt like we do it for RTM_ADD and RTM_RESOLVE, rather than
messing around with 1->0 transitions for rtfree() all over.
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r-- | sys/net/rtsock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 0c441ef..25276d7 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -356,8 +356,7 @@ route_output(m, so) case RTM_DELETE: error = rtrequest1(RTM_DELETE, &info, &saved_nrt); if (error == 0) { - if ((rt = saved_nrt)) - rt->rt_refcnt++; + rt = saved_nrt; goto report; } break; |