Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Decrease the reference count before freeing, so...
details: https://anonhg.NetBSD.org/src/rev/41c9c5f71cf1
branches: trunk
changeset: 452879:41c9c5f71cf1
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 26 10:18:42 2019 +0000
description:
Decrease the reference count before freeing, so that the entries actually
get free'd. (Ryota Ozaki)
diffstat:
sys/netinet6/nd6.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (42 lines):
diff -r 03e49a4426ef -r 41c9c5f71cf1 sys/netinet6/nd6.c
--- a/sys/netinet6/nd6.c Fri Jul 26 10:03:40 2019 +0000
+++ b/sys/netinet6/nd6.c Fri Jul 26 10:18:42 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nd6.c,v 1.255 2019/06/28 06:45:16 ozaki-r Exp $ */
+/* $NetBSD: nd6.c,v 1.256 2019/07/26 10:18:42 christos Exp $ */
/* $KAME: nd6.c,v 1.279 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.255 2019/06/28 06:45:16 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6.c,v 1.256 2019/07/26 10:18:42 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -497,6 +497,7 @@
ln->ln_hold = m0;
clear_llinfo_pqueue(ln);
}
+ LLE_REMREF(ln);
nd6_free(ln, 0);
ln = NULL;
if (m != NULL) {
@@ -516,6 +517,7 @@
case ND6_LLINFO_STALE:
/* Garbage Collection(RFC 2461 5.3) */
if (!ND6_LLINFO_PERMANENT(ln)) {
+ LLE_REMREF(ln);
nd6_free(ln, 1);
ln = NULL;
}
@@ -539,6 +541,7 @@
daddr6 = &ln->r_l3addr.addr6;
send_ns = true;
} else {
+ LLE_REMREF(ln);
nd6_free(ln, 0);
ln = NULL;
}
Home |
Main Index |
Thread Index |
Old Index