]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Annotate missing unlock in connection_spawn() (CID #1414434)
authorJames Jones <jejones3141@gmail.com>
Mon, 27 Nov 2023 19:52:00 +0000 (13:52 -0600)
committerAlan DeKok <aland@freeradius.org>
Mon, 15 Jan 2024 23:43:51 +0000 (18:43 -0500)
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.

src/lib/server/pool.c

index 607f7469dab018b63d6d4476f0a634c8cccf7276..7dc4030743e97a43c2853bac27a89c9abcaa75d6 100644 (file)
@@ -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;
 }