aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-05-06 12:20:51 -0400
committerBruce Momjian <bruce@momjian.us>2014-05-06 12:20:51 -0400
commit4335c958154c39ef99a38dc953b3f803b13a1048 (patch)
tree6da56d9d593004a6e40906b74428b4dfc462790d /src
parent0a7832005792fa6dad171f9cadb8d587fe0dd800 (diff)
downloadpostgresql-4335c958154c39ef99a38dc953b3f803b13a1048.tar.gz
postgresql-4335c958154c39ef99a38dc953b3f803b13a1048.zip
Fix improperly passed file descriptors
Fix for commit 14ea89366fe321609afc5838ff9fe2ded1cd707d Report by Andres Freund
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_backup_tar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 0cb72650b01..aa06503fb04 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -558,15 +558,15 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
if (th->zFH)
{
res = GZREAD(&((char *) buf)[used], 1, len, th->zFH);
- if (res != len && !GZEOF(fh))
+ if (res != len && !GZEOF(th->zFH))
exit_horribly(modulename,
"could not read from input file: %s\n", strerror(errno));
}
else
{
res = fread(&((char *) buf)[used], 1, len, th->nFH);
- if (res != len && !feof(fh))
- READ_ERROR_EXIT(fh);
+ if (res != len && !feof(th->nFH))
+ READ_ERROR_EXIT(th->nFH);
}
}
else