From: Alan T. DeKok Date: Wed, 31 May 2017 16:58:45 +0000 (-0400) Subject: simpler coverity things X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b62eddb76dcb9fca0fb714e1cd86413907d226c3;p=thirdparty%2Ffreeradius-server.git simpler coverity things CID #1411786 --- diff --git a/src/main/connection.c b/src/main/connection.c index f30e652b985..e1af42b37da 100644 --- a/src/main/connection.c +++ b/src/main/connection.c @@ -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; }