From: Ken Raeburn Date: Sun, 15 Aug 2004 23:10:35 +0000 (+0000) Subject: * cc_file.c (dereference): Lock mutex around call to krb5_fcc_close_file X-Git-Tag: krb5-1.4-beta1~147 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f6cef7981ba2728a563eb2fe6091c1d1d95d515d;p=krb5.git * cc_file.c (dereference): Lock mutex around call to krb5_fcc_close_file git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16664 dc483132-0cff-0310-8789-dd5450dbe970 --- 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 + + * cc_file.c (dereference): Lock mutex around call to + krb5_fcc_close_file. + 2004-08-12 Ken Raeburn * 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);