aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2026-05-21 21:14:41 +0000
committerEd Maste <emaste@FreeBSD.org>2026-06-05 19:37:58 +0000
commit28833ade34e4eabbbbf985217e552ac589fb9329 (patch)
tree98a94a32bef13514c203ccc572931461948ffb0e
parent8bbe1d5422bc04e870482de6a0c05e769a106b1a (diff)
netlink: Fix lock leak in nl_find_nhop
Reviewed by: bz, pouria Fixes: 7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57156 (cherry picked from commit d66fec481bfd65cbabb6c12a410d76843e76083e) (cherry picked from commit ab599e44dba31d7b002aed8c71242e06d992b21a)
-rw-r--r--sys/netlink/route/nexthop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c
index 0d6bb5c9ec84..e7f08f2f8f3a 100644
--- a/sys/netlink/route/nexthop.c
+++ b/sys/netlink/route/nexthop.c
@@ -174,7 +174,7 @@ nl_find_nhop(uint32_t fibnum, int family, uint32_t uidx,
CHT_SLIST_FIND_BYOBJ(&ctl->un_head, unhop, &key, unhop);
if (unhop != NULL) {
struct nhop_object *nh = unhop->un_nhop;
- UN_RLOCK(ctl);
+ UN_RUNLOCK(ctl);
*perror = 0;
nhop_ref_any(nh);
return (nh);