summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-11-19 11:57:54 -0500
committerRobert Haas <rhaas@postgresql.org>2014-11-19 12:20:47 -0500
commit57ce746617b6d253602e4c34682d0a75408b3186 (patch)
treeead10e30d7c7b7b824556dddca1d680b864296a9 /contrib
parent26b27b274063a205611570a0f019216f3ee7dbb0 (diff)
downloadpostgresql-57ce746617b6d253602e4c34682d0a75408b3186.tar.gz
Avoid file descriptor leak in pg_test_fsync.
This can cause problems on Windows, where files that are still open can't be unlinked. Jeff Janes
Diffstat (limited to 'contrib')
-rw-r--r--contrib/pg_test_fsync/pg_test_fsync.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c
index 9fe2301e41..dfb2172796 100644
--- a/contrib/pg_test_fsync/pg_test_fsync.c
+++ b/contrib/pg_test_fsync/pg_test_fsync.c
@@ -258,8 +258,6 @@ test_sync(int writes_per_op)
}
else
{
- if ((tmpfile = open(filename, O_RDWR | O_DSYNC | PG_O_DIRECT, 0)) == -1)
- die("could not open output file");
START_TIMER;
for (ops = 0; alarm_triggered == false; ops++)
{