diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-01-20 19:59:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-01-20 19:59:54 +0100 |
commit | 23c9e8b3bc86ac1083dd97b00c943fbb7af7bc29 (patch) | |
tree | b25a0746e1d786a05fd21de6c7870c6c678226ae | |
parent | 8822744b4d9d40aa1fd59870a8bdd7c64c59a42b (diff) | |
download | vim-23c9e8b3bc86ac1083dd97b00c943fbb7af7bc29.zip |
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)
-rw-r--r-- | src/evalfunc.c | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 4b6bfaa13..c7be082fa 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -11832,6 +11832,7 @@ get_cmd_output_as_rettv( if (buf == NULL) { EMSGN(_(e_nobufnr), argvars[1].vval.v_number); + fclose(fd); goto errret; } diff --git a/src/version.c b/src/version.c index f3c4a4bf5..e350e9c11 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 207, +/**/ 206, /**/ 205, |