pullup from trunk
authorTom Yu <tlyu@mit.edu>
Tue, 18 Jan 2005 17:51:38 +0000 (17:51 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 18 Jan 2005 17:51:38 +0000 (17:51 +0000)
ticket: 2879
version_fixed: 1.4
component: krb5-libs

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@17054 dc483132-0cff-0310-8789-dd5450dbe970

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

index 985664014dcc36964126a76c4755d6784c4f91e5..2247776e6db1b1b4fb74eb5d02415074684ec4d3 100644 (file)
@@ -2,8 +2,6 @@
 
        * prof_file.c (profile_free_file_data): Destroy mutex before
        freeing containing structure.
-       (profile_open_file): If mutex creation fails, free storage
-       directly instead of calling profile_close_file.
 
 2004-12-14  Ken Raeburn  <raeburn@mit.edu>
 
index cada5250565305a5206a4127eb6529dd90f9f65f..9b0048c9cbb18f2f8709e067644164a3db114652 100644 (file)
@@ -579,12 +579,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();
 }