diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-20 21:02:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-20 21:02:00 +0100 |
commit | be6aa46c4d8948e164f7d181dc19ed2fc4818395 (patch) | |
tree | b07d81caa1595bd3f8cf036389a60f65684c4389 | |
parent | 03602ec28ed25739e88b2c835adb0662d3720bb2 (diff) | |
download | vim-git-be6aa46c4d8948e164f7d181dc19ed2fc4818395.tar.gz |
patch 7.4.1625v7.4.1625
Problem: Trying to close file descriptor that isn't open.
Solution: Check for negative number.
-rw-r--r-- | src/os_unix.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 4cc9de7c4..cda5407f8 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5214,11 +5214,11 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED) job->jv_channel = channel; /* ch_refcount was set above */ /* child stdin, stdout and stderr */ - if (!use_file_for_in) + if (!use_file_for_in && fd_in[0] >= 0) close(fd_in[0]); - if (!use_file_for_out) + if (!use_file_for_out && fd_out[1] >= 0) close(fd_out[1]); - if (!use_out_for_err && !use_file_for_err) + if (!use_out_for_err && !use_file_for_err && fd_err[1] >= 0) close(fd_err[1]); if (channel != NULL) { diff --git a/src/version.c b/src/version.c index d465d8151..7e1b515ab 100644 --- a/src/version.c +++ b/src/version.c @@ -749,6 +749,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1625, +/**/ 1624, /**/ 1623, |