mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Fix fd leak in pg_verifybackup
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.
This commit is contained in:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user