projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2720291
)
Call fileno and krb5_lock_file before calling fclose, rather than after.
author
Ken Raeburn
<raeburn@mit.edu>
Sat, 14 Oct 2006 00:17:48 +0000
(
00:17
+0000)
committer
Ken Raeburn
<raeburn@mit.edu>
Sat, 14 Oct 2006 00:17:48 +0000
(
00:17
+0000)
Caught by valgrind.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18700
dc483132
-0cff-0310-8789-
dd5450dbe970
src/kadmin/dbutil/dump.c
patch
|
blob
|
history
diff --git
a/src/kadmin/dbutil/dump.c
b/src/kadmin/dbutil/dump.c
index 12b6a46efe26f267d13138893acac14edbed54fe..e1f1d8848fdfad26faf5a7a6d7ea8254590eb101 100644
(file)
--- 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)