pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f
Date: 2015-01-04 13:42:58
Message-ID: E1Y7lSM-0006sH-Cb@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/0398ece4c5baacc98f0fd46a731518b3ccb25bb3

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

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2015-01-04 13:43:00 pgsql: Fix inconsequential fd leak in the new mark_file_as_archived() f
Previous Message Andres Freund 2015-01-03 20:41:04 pgsql: Prevent WAL files created by pg_basebackup -x/X from being archi