Permalink
Browse files

patch 8.0.1064: Coverity warns for leaking resource

Problem:    Coverity warns for leaking resource.
Solution:   Free pty_master_fd on failure.
  • Loading branch information...
brammool committed Sep 5, 2017
1 parent 28550b7 commit 1b9f9d315f137cc883c7aecd39f3df329b7f9085
Showing with 5 additions and 0 deletions.
  1. +3 −0 src/os_unix.c
  2. +2 −0 src/version.c
View
@@ -5692,7 +5692,10 @@ mch_create_pty_channel(job_T *job, jobopt_T *options)
channel = add_channel();
if (channel == NULL)
{
close(pty_master_fd);
return FAIL;
}
job->jv_channel = channel; /* ch_refcount was set by add_channel() */
channel->ch_keep_open = TRUE;
View
@@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1064,
/**/
1063,
/**/

0 comments on commit 1b9f9d3

Please sign in to comment.