* prof_file.c (profile_open_file): If an error occurs while updating from the
authorKen Raeburn <raeburn@mit.edu>
Sat, 28 Aug 2004 16:35:58 +0000 (16:35 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 28 Aug 2004 16:35:58 +0000 (16:35 +0000)
input file, destroy the mutex only if we're not sharing file data.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16698 dc483132-0cff-0310-8789-dd5450dbe970

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

index c7b4be1e1e6d887f0b629cd5743f50d6cfdd0a43..d5376ccdb0db7ef025e00a613702c86b9a0602b9 100644 (file)
@@ -1,3 +1,9 @@
+2004-08-28  Ken Raeburn  <raeburn@mit.edu>
+
+       * prof_file.c (profile_open_file): If an error occurs while
+       updating from the input file, destroy the mutex only if we're not
+       sharing file data.
+
 2004-08-27  Ken Raeburn  <raeburn@mit.edu>
 
        * prof_parse.c (parse_std_line): Rewrite handling of whitespace in
index 6220ca62f39e09c0564d7697051eca87818cfcf5..2baebfbc179e7ae2f685036298acfc1783bcf042 100644 (file)
@@ -225,7 +225,9 @@ errcode_t profile_open_file(const_profile_filespec_t filespec,
 
        retval = profile_update_file(prf);
        if (retval) {
+#ifndef SHARE_TREE_DATA
                k5_mutex_destroy(&data->lock);
+#endif
                profile_close_file(prf);
                return retval;
        }