From 902bb02ea75692f489913d34e48cb4aefe01a252 Mon Sep 17 00:00:00 2001 From: James Jones Date: Thu, 25 Jan 2024 15:56:41 -0600 Subject: [PATCH] Move fr_assert() check of mutex-guarded data after the lock (CID #1587069) --- src/lib/io/master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/io/master.c b/src/lib/io/master.c index 52733d8f4ec7..04bff3962871 100644 --- a/src/lib/io/master.c +++ b/src/lib/io/master.c @@ -2062,13 +2062,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);