Skip to content

Commit be6aa46

Browse files
committed
patch 7.4.1625
Problem: Trying to close file descriptor that isn't open. Solution: Check for negative number.
1 parent 03602ec commit be6aa46

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/os_unix.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5214,11 +5214,11 @@ mch_start_job(char **argv, job_T *job, jobopt_T *options UNUSED)
52145214
job->jv_channel = channel; /* ch_refcount was set above */
52155215

52165216
/* child stdin, stdout and stderr */
5217-
if (!use_file_for_in)
5217+
if (!use_file_for_in && fd_in[0] >= 0)
52185218
close(fd_in[0]);
5219-
if (!use_file_for_out)
5219+
if (!use_file_for_out && fd_out[1] >= 0)
52205220
close(fd_out[1]);
5221-
if (!use_out_for_err && !use_file_for_err)
5221+
if (!use_out_for_err && !use_file_for_err && fd_err[1] >= 0)
52225222
close(fd_err[1]);
52235223
if (channel != NULL)
52245224
{

src/version.c

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

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1625,
751753
/**/
752754
1624,
753755
/**/

0 commit comments

Comments
 (0)