(profile_dereference_data): Call it.
* prof_set.c (rw_setup): Likewise.
* prof_int.h (profile_dereference_data_locked): Declare it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16792
dc483132-0cff-0310-8789-
dd5450dbe970
+2004-09-28 Ken Raeburn <raeburn@mit.edu>
+
+ * prof_file.c (profile_dereference_data_locked): New function.
+ (profile_dereference_data): Call it.
+ * prof_set.c (rw_setup): Likewise.
+ * prof_int.h (profile_dereference_data_locked): Declare it.
+
2004-09-26 Tom Yu <tlyu@mit.edu>
* Makefile.in (check-unix-tcl-ok): Use KRB5_RUN_ENV.
err = k5_mutex_lock(&g_shared_trees_mutex);
if (err)
return;
+ profile_dereference_data_locked(data);
+ (void) k5_mutex_unlock(&g_shared_trees_mutex);
+#else
+ profile_free_file_data(data);
+#endif
+}
+void profile_dereference_data_locked(prf_data_t data)
+{
+#ifdef SHARE_TREE_DATA
data->refcount--;
if (data->refcount == 0)
profile_free_file_data(data);
- (void) k5_mutex_unlock(&g_shared_trees_mutex);
#else
profile_free_file_data(data);
#endif
(prf_file_t profile);
void profile_dereference_data (prf_data_t);
+void profile_dereference_data_locked (prf_data_t);
/* prof_init.c -- included from profile.h */
errcode_t profile_ser_size
free(new_data);
return retval;
}
- profile_dereference_data(file->data);
+ profile_dereference_data_locked(file->data);
file->data = new_data;
}
#endif /* SHARE_TREE_DATA */