summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util/profile/ChangeLog2
-rw-r--r--src/util/profile/prof_file.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/src/util/profile/ChangeLog b/src/util/profile/ChangeLog
index 2247776e6..985664014 100644
--- a/src/util/profile/ChangeLog
+++ b/src/util/profile/ChangeLog
@@ -2,6 +2,8 @@
* 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>
diff --git a/src/util/profile/prof_file.c b/src/util/profile/prof_file.c
index dac4e8a1f..9b0048c9c 100644
--- a/src/util/profile/prof_file.c
+++ b/src/util/profile/prof_file.c
@@ -272,7 +272,8 @@ errcode_t profile_open_file(const_profile_filespec_t filespec,
retval = k5_mutex_init(&data->lock);
if (retval) {
- profile_close_file(prf);
+ free(data);
+ free(prf);
return retval;
}