Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf4060db

Browse files
committed
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 ofpg_basebackup the FD leak couldn't ever lead to a real problem. Itseems better to fix the leak anyway though, rather than silenceCoverity, as the usage of the function might get extended or copied atsome point in the future.Pointed out by Coverity.Backpatch to 9.2, like the relevant part of the previous patch.
1 parentf961ad4 commitf4060db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎src/bin/pg_basebackup/receivelog.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ mark_file_as_archived(const char *basedir, const char *fname)
6565
{
6666
fprintf(stderr,_("%s: could not fsync file \"%s\": %s\n"),
6767
progname,tmppath,strerror(errno));
68+
69+
close(fd);
70+
6871
return false;
6972
}
7073

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp