git: b55bffeaaf9b - main - netinet6: Fix memory leak on auto_linklocal
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 02 Mar 2026 15:32:19 UTC
The branch main has been updated by pouria:
URL: https://cgit.FreeBSD.org/src/commit/?id=b55bffeaaf9bae5dc7aa21eae441d89c999ebab8
commit b55bffeaaf9bae5dc7aa21eae441d89c999ebab8
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-02 15:25:23 +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
---
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 a952192b6b62..237fb7ecfd44 100644
--- a/sys/netinet6/in6_ifattach.c
+++ b/sys/netinet6/in6_ifattach.c
@@ -630,8 +630,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;
}