From: James Jones Date: Mon, 27 Nov 2023 19:52:00 +0000 (-0600) Subject: Annotate missing unlock in connection_spawn() (CID #1414434) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c5039524d2caa06224eb1f582cc9401abef5625;p=thirdparty%2Ffreeradius-server.git Annotate missing unlock in connection_spawn() (CID #1414434) 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. --- diff --git a/src/lib/server/pool.c b/src/lib/server/pool.c index 607f7469dab..7dc4030743e 100644 --- a/src/lib/server/pool.c +++ b/src/lib/server/pool.c @@ -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; }