Skip to content

Commit 1b9f9d3

Browse files
committed
patch 8.0.1064: Coverity warns for leaking resource
Problem: Coverity warns for leaking resource. Solution: Free pty_master_fd on failure.
1 parent 28550b7 commit 1b9f9d3

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/os_unix.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5692,7 +5692,10 @@ mch_create_pty_channel(job_T *job, jobopt_T *options)
56925692

56935693
channel = add_channel();
56945694
if (channel == NULL)
5695+
{
5696+
close(pty_master_fd);
56955697
return FAIL;
5698+
}
56965699
job->jv_channel = channel; /* ch_refcount was set by add_channel() */
56975700
channel->ch_keep_open = TRUE;
56985701

src/version.c

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

770770
static int included_patches[] =
771771
{ /* Add new patch number below this line */
772+
/**/
773+
1064,
772774
/**/
773775
1063,
774776
/**/

0 commit comments

Comments
 (0)