]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "Move fr_assert() check of mutex-guarded data after the lock (CID #158…" revert-5281-client_expiry_timer_move_lock
authorAlan DeKok <aland@freeradius.org>
Fri, 24 May 2024 12:19:40 +0000 (08:19 -0400)
committerGitHub <noreply@github.com>
Fri, 24 May 2024 12:19:40 +0000 (08:19 -0400)
This reverts commit 56fd7e0b4f1779505d64ce6d14a447a5aacbb2b3.

src/lib/io/master.c

index 87729313347be80dc11306df97ce10f66ca3c0d8..9165d9e066156d802f70a68d0cff4f6260675b51 100644 (file)
@@ -2079,13 +2079,13 @@ static void client_expiry_timer(fr_event_list_t *el, fr_time_t now, void *uctx)
        }
 
        fr_assert(!connection);
+       fr_assert(client->ht != NULL);
 
        /*
         *      Find out how many connections are using this
         *      client.
         */
        pthread_mutex_lock(&client->mutex);
-       fr_assert(client->ht != NULL);
        connections = fr_hash_table_num_elements(client->ht);
        pthread_mutex_unlock(&client->mutex);