summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2005-01-14 03:12:21 +0000
committerKen Raeburn <raeburn@mit.edu>2005-01-14 03:12:21 +0000
commit010867baeffd9c5a5b7e9ac390809ff87580673f (patch)
tree852e45c2425c8ec9ba55d92a6f204fa4bebe227c
parent125f5755e4fb4c91224843c1a3f55506d0c107ec (diff)
downloadkrb5-010867baeffd9c5a5b7e9ac390809ff87580673f.tar.gz
krb5-010867baeffd9c5a5b7e9ac390809ff87580673f.tar.xz
krb5-010867baeffd9c5a5b7e9ac390809ff87580673f.zip
profile code never destroys its per-file mutexes
* prof_file.c (profile_free_file_data): Destroy mutex before freeing containing structure. ticket: new target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17029 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/util/profile/ChangeLog5
-rw-r--r--src/util/profile/prof_file.c13
2 files changed, 12 insertions, 6 deletions
diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog
index bfe6636365..2247776e6d 100644
--- a/src/util/profile/ChangeLog
+++ b/src/util/profile/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-13 Ken Raeburn <raeburn@mit.edu>
+
+ * prof_file.c (profile_free_file_data): Destroy mutex before
+ freeing containing structure.
+
2004-12-14 Ken Raeburn <raeburn@mit.edu>
* prof_tree.c (profile_node_iterator): When the iterator has a
diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c
index 0282537206..dac4e8a1f9 100644
--- a/src/util/profile/prof_file.c
+++ b/src/util/profile/prof_file.c
@@ -578,12 +578,13 @@ static void profile_free_file_data(prf_data_t data)
}
}
}
- if (data->root)
- profile_free_node(data->root);
- if (data->comment)
- free(data->comment);
- data->magic = 0;
- free(data);
+ if (data->root)
+ profile_free_node(data->root);
+ if (data->comment)
+ free(data->comment);
+ data->magic = 0;
+ k5_mutex_destroy(&data->lock);
+ free(data);
scan_shared_trees_locked();
}