pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f
Date
Msg-id E1Y7lSR-0006te-F7@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix inconsequential fd leak in the new mark_file_as_archived() function.

As every error in mark_file_as_archived() will lead to a failure of
pg_basebackup the FD leak couldn't ever lead to a real problem.  It
seems better to fix the leak anyway though, rather than silence
Coverity, as the usage of the function might get extended or copied at
some point in the future.

Pointed out by Coverity.

Backpatch to 9.2, like the relevant part of the previous patch.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f4060db11852e65c97d956a5b1d860ebb180e767

Modified Files
--------------
src/bin/pg_basebackup/receivelog.c |    3 +++
1 file changed, 3 insertions(+)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f
Next
From: Andres Freund
Date:
Subject: pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f