projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e98c900
)
Fix fd leak in pg_verifybackup
author
Michael Paquier
Mon, 7 Dec 2020 00:29:32 +0000
(09:29 +0900)
committer
Michael Paquier
Mon, 7 Dec 2020 00:30:36 +0000
(09:30 +0900)
An error code path newly-introduced by
87ae969
forgot to close a file
descriptor when verifying a file's checksum.
Per report from Coverity, via Tom Lane.
src/bin/pg_verifybackup/pg_verifybackup.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/pg_verifybackup/pg_verifybackup.c
b/src/bin/pg_verifybackup/pg_verifybackup.c
index 07320d369975892b290ec8d50043860d389fc42b..bf388de79fa5def0cf1a62443f7628894b9fd499 100644
(file)
--- a/
src/bin/pg_verifybackup/pg_verifybackup.c
+++ b/
src/bin/pg_verifybackup/pg_verifybackup.c
@@
-730,6
+730,7
@@
verify_file_checksum(verifier_context *context, manifest_file *m,
{
report_backup_error(context, "could not initialize checksum of file \"%s\"",
relpath);
+ close(fd);
return;
}