]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
simpler coverity things
authorAlan T. DeKok <aland@freeradius.org>
Wed, 31 May 2017 16:58:45 +0000 (12:58 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 31 May 2017 16:58:45 +0000 (12:58 -0400)
CID #1411786

src/main/connection.c

index f30e652b9855423a53b487dbe7a681a1b2d8360d..e1af42b37da8a829fd36b2a216063c41e0780cf0 100644 (file)
@@ -1061,18 +1061,9 @@ fr_connection_pool_t *fr_connection_pool_init(TALLOC_CTX *ctx,
                cf_log_err_cs(cs, "Cannot set 'max' to zero");
                goto error;
        }
-#ifdef __COVERITY__
-       /*
-        *      Coverity is dumb, and doesn't realise there
-        *      can only be one thread in this code at a
-        *      time.
-        */
-       pthread_mutex_lock(&pool->mutex);
-#endif
+
+       /* coverity[missing_unlock] */
        pool->pending_window = (pool->max_pending > 0) ? pool->max_pending : pool->max;
-#ifdef __COVERITY__
-       pthread_mutex_unlock(&pool->mutex);
-#endif
 
        if (pool->min > pool->max) {
                cf_log_err_cs(cs, "Cannot set 'min' to more than 'max'");
@@ -1117,6 +1108,7 @@ fr_connection_pool_t *fr_connection_pool_init(TALLOC_CTX *ctx,
                if (!this) {
                        ERROR("Failed spawning initial connections");
                error:
+                       /* coverity[missing_unlock] */
                        fr_connection_pool_free(pool);
                        return NULL;
                }