From 750388bda000a1ac00550ae400a4b5ace3dc1c37 Mon Sep 17 00:00:00 2001 From: Kamalesh Babulal Date: Fri, 20 May 2022 08:25:35 -0600 Subject: [PATCH] src/config: fix coverity warning about add missing unlock() Add missing unlock() of cg_mount_table_lock, reported by Coverity tool: CID 1412126 (#1 of 1): Missing unlock (LOCK). missing_unlock: Returning without unlocking cg_mount_table_lock. Signed-off-by: Kamalesh Babulal Signed-off-by: Tom Hromatka --- src/config.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 96227b28..56876fb6 100644 --- a/src/config.c +++ b/src/config.c @@ -973,8 +973,10 @@ static int config_order_namespace_table(void) } } } - if (!flag) - return ECGNAMESPACECONTROLLER; + if (!flag) { + error = ECGNAMESPACECONTROLLER; + break; + } } error_out: pthread_rwlock_unlock(&cg_mount_table_lock); -- 2.47.3