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 d98623e7f07..651adfdcc95 100644 --- a/src/bin/pg_dump/pg_backup_archiver.c +++ b/src/bin/pg_dump/pg_backup_archiver.c @@ -269,6 +269,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) @@ -1582,6 +1583,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 |