diff options
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r-- | src/bin/pg_dump/pg_backup_archiver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c index 24cc0962558..87113cfd442 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -268,6 +268,7 @@ CloseArchive(Archive *AHX) AH->ClosePtr(AH); /* Close the output */ + errno = 0; /* in case gzclose() doesn't set it */ if (AH->gzOut) res = GZCLOSE(AH->OF); else if (AH->OF != stdout) @@ -1567,6 +1568,7 @@ RestoreOutput(ArchiveHandle *AH, OutputContext savedContext) { int res; + errno = 0; /* in case gzclose() doesn't set it */ if (AH->gzOut) res = GZCLOSE(AH->OF); else |