summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/ccache/ChangeLog5
-rw-r--r--src/lib/krb5/ccache/cc_file.c5
2 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/krb5/ccache/ChangeLog b/src/lib/krb5/ccache/ChangeLog
index f685331a7..b7594a203 100644
--- a/src/lib/krb5/ccache/ChangeLog
+++ b/src/lib/krb5/ccache/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-15 Ken Raeburn <raeburn@mit.edu>
+
+ * cc_file.c (dereference): Lock mutex around call to
+ krb5_fcc_close_file.
+
2004-08-12 Ken Raeburn <raeburn@mit.edu>
* cc_file.c (krb5_fcc_close_file): Change first argument to be an
diff --git a/src/lib/krb5/ccache/cc_file.c b/src/lib/krb5/ccache/cc_file.c
index ee8a7a86d..5776e29e4 100644
--- a/src/lib/krb5/ccache/cc_file.c
+++ b/src/lib/krb5/ccache/cc_file.c
@@ -1395,8 +1395,11 @@ static krb5_error_code dereference(krb5_context context, krb5_fcc_data *data)
*fccsp = (*fccsp)->next;
k5_mutex_unlock(&krb5int_cc_file_mutex);
free(data->filename);
- if (data->file >= 0)
+ if (data->file >= 0) {
+ k5_mutex_lock(&data->lock);
krb5_fcc_close_file(context, data);
+ k5_mutex_unlock(&data->lock);
+ }
k5_mutex_assert_unlocked(&data->lock);
k5_mutex_destroy(&data->lock);
free(data);