profile code never destroys its per-file mutexes
authorKen Raeburn <raeburn@mit.edu>
Fri, 14 Jan 2005 03:12:21 +0000 (03:12 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 14 Jan 2005 03:12:21 +0000 (03:12 +0000)
* 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

src/util/profile/ChangeLog
src/util/profile/prof_file.c

index bfe663636591830901a306f541f4307e4a2ad90e..2247776e6db1b1b4fb74eb5d02415074684ec4d3 100644 (file)
@@ -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
index 028253720690e2007221ccffd4d8628a047a1b40..dac4e8a1f9660b4328e3a3bf8b866e1a2595b09e 100644 (file)
@@ -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();
 }