]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "Unlock mutex when we find a matching connection"
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 20 Feb 2013 14:41:39 +0000 (09:41 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 20 Feb 2013 14:42:48 +0000 (09:42 -0500)
This reverts commit 84fa208a76fc6415d4e5f4c6cb4f1101799b3c89.

src/main/connection.c

index 48b2b473194864453a516451968a25ffb05962d9..3f358948c44baf8c62ef9aa56fe11e0300c769c5 100644 (file)
@@ -456,13 +456,10 @@ static fr_connection_t *fr_connection_find(fr_connection_pool_t *pool, void *con
         *      order to find top of the parent structure.
         */
        for (this = pool->head; this != NULL; this = this->next) {
-               if (this->connection == conn) {
-                       pthread_mutex_unlock(&pool->mutex);
-                       return this;
-               }
+               if (this->connection == conn) return this;
        }
 
-
+       pthread_mutex_unlock(&pool->mutex);
        return NULL;
 }