From: James Jones Date: Wed, 3 Aug 2022 13:42:47 +0000 (-0500) Subject: missing_lock, not missing_unlock (CID #1414431) (#4635) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3c33129a0d55854f7b0684b86505bd0a9fa7bca;p=thirdparty%2Ffreeradius-server.git missing_lock, not missing_unlock (CID #1414431) (#4635) Typo in coverity annotation. Unnecessary missing_lock annotations have been removed. --- diff --git a/src/lib/server/exfile.c b/src/lib/server/exfile.c index 4323f4741ad..2ff0f067704 100644 --- a/src/lib/server/exfile.c +++ b/src/lib/server/exfile.c @@ -508,7 +508,6 @@ try_lock: exfile_trigger_exec(ef, &ef->entries[i], "reserve"); - /* coverity[missing_unlock] */ return ef->entries[i].fd; } diff --git a/src/lib/server/pool.c b/src/lib/server/pool.c index 2269c9603c5..c7161f28775 100644 --- a/src/lib/server/pool.c +++ b/src/lib/server/pool.c @@ -295,7 +295,6 @@ static fr_pool_connection_t *connection_find(fr_pool_t *pool, void *conn) #endif fr_assert(this->in_use == true); - /* coverity[missing_unlock] */ return this; } } @@ -518,7 +517,6 @@ static fr_pool_connection_t *connection_spawn(fr_pool_t *pool, request_t *reques pthread_cond_broadcast(&pool->done_spawn); if (unlock) pthread_mutex_unlock(&pool->mutex); - /* coverity[missing_unlock] */ return this; } @@ -1051,7 +1049,7 @@ fr_pool_t *fr_pool_init(TALLOC_CTX *ctx, goto error; } - /* coverity[missing_unlock] */ + /* coverity[missing_lock] */ pool->pending_window = (pool->max_pending > 0) ? pool->max_pending : pool->max; if (pool->min > pool->max) { diff --git a/src/modules/rlm_detail/rlm_detail.c b/src/modules/rlm_detail/rlm_detail.c index 233e1e18a4d..3b93a97051e 100644 --- a/src/modules/rlm_detail/rlm_detail.c +++ b/src/modules/rlm_detail/rlm_detail.c @@ -379,7 +379,6 @@ static unlang_action_t CC_HINT(nonnull) detail_do(rlm_rcode_t *p_result, module_ outfd = exfile_open(inst->ef, buffer, inst->perm); if (outfd < 0) { RPERROR("Couldn't open file %s", buffer); - /* coverity[missing_unlock] */ RETURN_MODULE_FAIL; } diff --git a/src/modules/rlm_linelog/rlm_linelog.c b/src/modules/rlm_linelog/rlm_linelog.c index 9434ae3096a..5861791f24e 100644 --- a/src/modules/rlm_linelog/rlm_linelog.c +++ b/src/modules/rlm_linelog/rlm_linelog.c @@ -782,7 +782,6 @@ finish: talloc_free(vpt); talloc_free(vector); - /* coverity[missing_unlock] */ RETURN_MODULE_RCODE(rcode); } diff --git a/src/modules/rlm_sql/sql.c b/src/modules/rlm_sql/sql.c index 43309a4eb60..db6777db8c2 100644 --- a/src/modules/rlm_sql/sql.c +++ b/src/modules/rlm_sql/sql.c @@ -612,7 +612,6 @@ void rlm_sql_query_log(rlm_sql_t const *inst, request_t *request, sql_acct_secti ERROR("Couldn't open logfile '%s': %s", expanded, fr_syserror(errno)); talloc_free(expanded); - /* coverity[missing_unlock] */ return; }