Fix profile_flush_to_file() state corruption In write_data_to_file(), do not clear the profile data object's flags. If the call to this function resulted from profile_flush_to_file(), we do not want to clear the DIRTY flag, and we especially do not want to clear the SHARED flag for a data object which is part of g_shared_trees. Instead, clear the DIRTY flag in profile_flush_file_data(). Add a test case to prof_test1 to exercise the bug in unfixed code. Also modify test1 to abandon the altered profile after flushing it to a file, to preserve the external behavior of the script before this fix. https://github.com/krb5/krb5/commit/32a05995ff9df0d5ef8aff0d020900a37747670d Author: Greg Hudson Commit: 32a05995ff9df0d5ef8aff0d020900a37747670d Branch: master src/util/profile/prof_file.c | 2 +- src/util/profile/prof_test1 | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-)