Skip to content

Commit 23c9e8b

Browse files
committed
patch 8.0.0207: leaking file descriptor when system() fails
Problem: Leaking file descriptor when system() cannot find the buffer. (Coverity) Solution: Close the file descriptor. (Dominique Pelle, closes #1398)
1 parent 8822744 commit 23c9e8b

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/evalfunc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11832,6 +11832,7 @@ get_cmd_output_as_rettv(
1183211832
if (buf == NULL)
1183311833
{
1183411834
EMSGN(_(e_nobufnr), argvars[1].vval.v_number);
11835+
fclose(fd);
1183511836
goto errret;
1183611837
}
1183711838

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
207,
767769
/**/
768770
206,
769771
/**/

0 commit comments

Comments
 (0)