Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix fd leak in pg_verifybackup
authorMichael Paquier <michael@paquier.xyz>
Mon, 7 Dec 2020 00:29:32 +0000 (09:29 +0900)
committerMichael Paquier <michael@paquier.xyz>
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

index 07320d369975892b290ec8d50043860d389fc42b..bf388de79fa5def0cf1a62443f7628894b9fd499 100644 (file)
@@ -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;
    }