From c5b4b994c18db86933255907a97eee5993fd18fe Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Mon, 10 Apr 2023 04:19:01 +0200 Subject: [PATCH] Fix TSan report in Kerberos --- src/util/profile/prof_file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c index aa951df05f2..ac14e0543da 100644 --- a/src/util/profile/prof_file.c +++ b/src/util/profile/prof_file.c @@ -216,7 +216,9 @@ errcode_t profile_open_file(const_profile_filespec_t filespec, } if (data) { data->refcount++; + k5_mutex_lock(&data->lock); data->last_stat = 0; /* Make sure to stat when updating. */ + k5_mutex_unlock(&data->lock); k5_mutex_unlock(&g_shared_trees_mutex); retval = profile_update_file_data(data, NULL); free(expanded_filename);