summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-05-04 13:54:12 -0300
committerRenato Botelho <renato@netgate.com>2016-05-04 13:54:12 -0300
commit070f476d8d2dddb76f93080010293ab127bd4f59 (patch)
tree01543addc15d8020760e3c38bc63a069965b47fc /lib
parentb174bde150957ccfa49627f93aa2c0fcd966eb62 (diff)
parent1fbf92c3ea82371bfc10d47cb9dc715a18f1287b (diff)
downloadFreeBSD-src-070f476d8d2dddb76f93080010293ab127bd4f59.zip
FreeBSD-src-070f476d8d2dddb76f93080010293ab127bd4f59.tar.gz
Merge remote-tracking branch 'origin/releng/10.3' into RELENG_2_3
Diffstat (limited to 'lib')
-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 333b1a1..12220a9 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);
}
OpenPOWER on IntegriCloud