Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move fr_assert() check of mutex-guarded data after the lock (CID #158…
Browse files Browse the repository at this point in the history
…7069)
jejones3141 committed Jan 25, 2024
1 parent 27da32a commit 902bb02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/io/master.c
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit 902bb02

Please sign in to comment.