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.
pull/59/head
Michael Paquier 5 years ago
parent e98c900993
commit 51c3889877
  1. 1
      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;
}

Loading…
Cancel
Save