diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/kadmin/dbutil/dump.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c index 12b6a46ef..e1f1d8848 100644 --- a/src/kadmin/dbutil/dump.c +++ b/src/kadmin/dbutil/dump.c @@ -1190,8 +1190,12 @@ dump_db(argc, argv) exit_status++; } if (ofile && f != stdout && !exit_status) { - fclose(f); - update_ok_file(ofile); + if (locked) { + (void) krb5_lock_file(util_context, fileno(f), KRB5_LOCKMODE_UNLOCK); + locked = 0; + } + fclose(f); + update_ok_file(ofile); } } if (locked) |
