netlink: Fix lock leak in nl_find_nhop
Reviewed by: bz, pouria
Fixes: 7e5bf68495 ("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)
This commit is contained in:
parent
04788d7c5a
commit
e97cdf37cc
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue