git: 8a727c3df89a - main - mroute: add missing WUNLOCK
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 28 Oct 2021 05:12:37 UTC
The branch main has been updated by wma: URL: https://cgit.FreeBSD.org/src/commit/?id=8a727c3df89acd02050b849a916e49ae447c1d9d commit 8a727c3df89acd02050b849a916e49ae447c1d9d Author: Wojciech Macek <wma@FreeBSD.org> AuthorDate: 2021-10-28 04:59:37 +0000 Commit: Wojciech Macek <wma@FreeBSD.org> CommitDate: 2021-10-28 05:12:23 +0000 mroute: add missing WUNLOCK Add missing WNLOCK as in all other error cases. Reported by: Stormshield Obtained from: Semihalf --- sys/netinet/ip_mroute.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index c992743a503e..02738616d56e 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -713,8 +713,10 @@ ip_mrouter_init(struct socket *so, int version) mtx_init(&V_bw_upcalls_ring_mtx, "mroute upcall buf_ring mtx", NULL, MTX_DEF); V_bw_upcalls_ring = buf_ring_alloc(BW_UPCALLS_MAX, M_MRTABLE, M_NOWAIT, &V_bw_upcalls_ring_mtx); - if (!V_bw_upcalls_ring) + if (!V_bw_upcalls_ring) { + MRW_WUNLOCK(); return (ENOMEM); + } /* Create upcall thread */ upcall_thread_shutdown = 0;