aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/db/hash
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2016-04-06 22:38:50 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2016-04-06 22:38:50 +0000
commit15719ec49938e1f7b3feb7a4df3c1862eeb4829a (patch)
tree7910e83b0323d45afcba2659ea75d9964895c04f /lib/libc/db/hash
parent9af130ae8c039e10912f13b58b5cb97362d00e72 (diff)
Notes
Diffstat (limited to 'lib/libc/db/hash')
-rw-r--r--lib/libc/db/hash/hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c
index 02503ee1b558..fc4e50eb0b25 100644
--- a/lib/libc/db/hash/hash.c
+++ b/lib/libc/db/hash/hash.c
@@ -423,7 +423,8 @@ hdestroy(HTAB *hashp)
free(hashp->tmp_buf);
if (hashp->fp != -1) {
- (void)_fsync(hashp->fp);
+ if (hashp->save_file)
+ (void)_fsync(hashp->fp);
(void)_close(hashp->fp);
}