0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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)
This commit is contained in:
Bram Moolenaar
2017-01-20 19:59:54 +01:00
parent 8822744b4d
commit 23c9e8b3bc
2 changed files with 3 additions and 0 deletions

View File

@@ -11832,6 +11832,7 @@ get_cmd_output_as_rettv(
if (buf == NULL)
{
EMSGN(_(e_nobufnr), argvars[1].vval.v_number);
fclose(fd);
goto errret;
}

View File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
207,
/**/
206,
/**/