Commit 51c38898 authored by Michael Paquier's avatar Michael Paquier

Fix fd leak in pg_verifybackup

An error code path newly-introduced by 87ae9691 forgot to close a file
descriptor when verifying a file's checksum.

Per report from Coverity, via Tom Lane.
parent e98c9009
...@@ -730,6 +730,7 @@ verify_file_checksum(verifier_context *context, manifest_file *m, ...@@ -730,6 +730,7 @@ verify_file_checksum(verifier_context *context, manifest_file *m,
{ {
report_backup_error(context, "could not initialize checksum of file \"%s\"", report_backup_error(context, "could not initialize checksum of file \"%s\"",
relpath); relpath);
close(fd);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment