From: Ken Raeburn Date: Fri, 14 Jan 2005 03:12:21 +0000 (+0000) Subject: profile code never destroys its per-file mutexes X-Git-Tag: ms-bug-test-20060525~383 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=010867baeffd9c5a5b7e9ac390809ff87580673f;p=krb5.git 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 --- diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog index bfe663636..2247776e6 100644 --- a/src/util/profile/ChangeLog +++ b/src/util/profile/ChangeLog @@ -1,3 +1,8 @@ +2005-01-13 Ken Raeburn + + * prof_file.c (profile_free_file_data): Destroy mutex before + freeing containing structure. + 2004-12-14 Ken Raeburn * 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 028253720..dac4e8a1f 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(); }