From: James Jones Date: Thu, 25 Jan 2024 21:56:41 +0000 (-0600) Subject: Move fr_assert() check of mutex-guarded data after the lock (CID #1587069) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56fd7e0b4f1779505d64ce6d14a447a5aacbb2b3;p=thirdparty%2Ffreeradius-server.git Move fr_assert() check of mutex-guarded data after the lock (CID #1587069) --- diff --git a/src/lib/io/master.c b/src/lib/io/master.c index 52733d8f4ec..04bff396287 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);