Skip to content

Commit

Permalink
Annotate missing unlock in connection_spawn() (CID #1414434)
Browse files Browse the repository at this point in the history
Coverity insists on unlocking mutexes in the same function
invocation the lock occurs in, but there are times when you
want exclusive use of a resource and thus lock it on allocation
and free on release, hence the annotation.
  • Loading branch information
jejones3141 committed Nov 27, 2023
1 parent 863a3f2 commit d07ba4d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/server/pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ 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;
}

Expand Down

0 comments on commit d07ba4d

Please sign in to comment.