summaryrefslogtreecommitdiffstats
path: root/src/util/et
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2005-01-14 03:15:41 +0000
committerKen Raeburn <raeburn@mit.edu>2005-01-14 03:15:41 +0000
commitdbe99f9b8db7711cba4a00aff55046a201f16ddb (patch)
treed33df3c970677b43b09a5850a5ad719beb7958ca /src/util/et
parent010867baeffd9c5a5b7e9ac390809ff87580673f (diff)
downloadkrb5-dbe99f9b8db7711cba4a00aff55046a201f16ddb.tar.gz
krb5-dbe99f9b8db7711cba4a00aff55046a201f16ddb.tar.xz
krb5-dbe99f9b8db7711cba4a00aff55046a201f16ddb.zip
* error_message.c (com_err_terminate): Lock the list mutex before walking
through it; unlock and destroy it afterwards. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17030 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/util/et')
-rw-r--r--src/util/et/ChangeLog5
-rw-r--r--src/util/et/error_message.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/util/et/ChangeLog b/src/util/et/ChangeLog
index e9b0e232b1..eeec13ebd7 100644
--- a/src/util/et/ChangeLog
+++ b/src/util/et/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-13 Ken Raeburn <raeburn@mit.edu>
+
+ * error_message.c (com_err_terminate): Lock the list mutex before
+ walking through it; unlock and destroy it afterwards.
+
2004-11-05 Ken Raeburn <raeburn@mit.edu>
* et_h.awk: Declare initialize_*_error_table as taking no
diff --git a/src/util/et/error_message.c b/src/util/et/error_message.c
index 42c230051f..8bef6804d9 100644
--- a/src/util/et/error_message.c
+++ b/src/util/et/error_message.c
@@ -62,11 +62,13 @@ void com_err_terminate(void)
struct dynamic_et_list *e, *enext;
if (! INITIALIZER_RAN(com_err_initialize) || PROGRAM_EXITING())
return;
- k5_mutex_destroy(&et_list_lock);
+ k5_mutex_lock(&et_list_lock);
for (e = et_list_dynamic; e; e = enext) {
enext = e->next;
free(e);
}
+ k5_mutex_unlock(&et_list_lock);
+ k5_mutex_destroy(&et_list_lock);
terminated = 1;
}