git: 8f0ea068db8a - stable/15 - netinet6: Fix memory leak on auto_linklocal
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 09 Mar 2026 09:42:01 UTC
The branch stable/15 has been updated by pouria:
URL: https://cgit.FreeBSD.org/src/commit/?id=8f0ea068db8a4b48575146579f30f6ef4fff6584
commit 8f0ea068db8a4b48575146579f30f6ef4fff6584
Author: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
AuthorDate: 2026-03-02 15:24:23 +0000
Commit: Pouria Mousavizadeh Tehrani <pouria@FreeBSD.org>
CommitDate: 2026-03-09 09:36:40 +0000
netinet6: Fix memory leak on auto_linklocal
release the refcount of link-local prefix information to ensure
it gets freed when the address is deleted.
Reviewed By: zlei, ivy
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55593
(cherry picked from commit b55bffeaaf9bae5dc7aa21eae441d89c999ebab8)
---
sys/netinet6/in6_ifattach.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c
index c9e951e93ec8..c35bc16903a2 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -629,8 +629,8 @@ in6_ifattach_linklocal(struct ifnet *ifp, struct ifnet *altifp)
/* Reference prefix */
ia->ia6_ndpr = pr;
pr->ndpr_addrcnt++;
- } else
- nd6_prefix_rele(pr);
+ }
+ nd6_prefix_rele(pr);
return 0;
}