git: 0daa28057c6c - main - ip_mroute: add unlock in early-exit
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Jan 2022 13:48:56 UTC
The branch main has been updated by wma:
URL: https://cgit.FreeBSD.org/src/commit/?id=0daa28057c6c323f8def0a1c78fadb789b63fd27
commit 0daa28057c6c323f8def0a1c78fadb789b63fd27
Author: Wojciech Macek <wma@FreeBSD.org>
AuthorDate: 2022-01-22 13:47:47 +0000
Commit: Wojciech Macek <wma@FreeBSD.org>
CommitDate: 2022-01-22 13:48:47 +0000
ip_mroute: add unlock in early-exit
Add missing unlock if V_ip_mrotue is not set
Obtained from: Semihalf
---
sys/netinet/ip_mroute.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index 0566048621ad..fdca39b5dbb9 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -741,8 +741,13 @@ X_ip_mrouter_done(void *locked)
vifi_t vifi;
struct bw_upcall *bu;
- if (V_ip_mrouter == NULL)
+ if (V_ip_mrouter == NULL) {
+ if (locked) {
+ struct epoch_tracker *mrouter_et = locked;
+ MROUTER_RUNLOCK_PARAM(mrouter_et);
+ }
return EINVAL;
+ }
/*
* Detach/disable hooks to the reset of the system.