projects
/
users
/
rhaas
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
805f798
)
pg_restore: Fix memory and file descriptor leak with directory format
author
Peter Eisentraut
<peter_e@gmx.net>
Fri, 16 Mar 2012 17:53:31 +0000
(19:53 +0200)
committer
Peter Eisentraut
<peter_e@gmx.net>
Fri, 16 Mar 2012 17:57:45 +0000
(19:57 +0200)
found by Coverity
src/bin/pg_dump/pg_backup_directory.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_dump/pg_backup_directory.c
b/src/bin/pg_dump/pg_backup_directory.c
index 111c3e822a88d52dd5694cbcdde2c905468c9ca2..3936479cdafa8a22e099f94b900ec906c280109d 100644
(file)
--- a/
src/bin/pg_dump/pg_backup_directory.c
+++ b/
src/bin/pg_dump/pg_backup_directory.c
@@
-365,6
+365,9
@@
_PrintFileData(ArchiveHandle *AH, char *filename, RestoreOptions *ropt)
ahwrite(buf, 1, cnt, AH);
free(buf);
+ if (cfclose(cfp) != 0)
+ die_horribly(AH, modulename, "could not close data file: %s\n",
+ strerror(errno));
}
/*