forked from aniani/vim
patch 8.0.1064: Coverity warns for leaking resource
Problem: Coverity warns for leaking resource. Solution: Free pty_master_fd on failure.
This commit is contained in:
@@ -5692,7 +5692,10 @@ mch_create_pty_channel(job_T *job, jobopt_T *options)
|
|||||||
|
|
||||||
channel = add_channel();
|
channel = add_channel();
|
||||||
if (channel == NULL)
|
if (channel == NULL)
|
||||||
|
{
|
||||||
|
close(pty_master_fd);
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
}
|
||||||
job->jv_channel = channel; /* ch_refcount was set by add_channel() */
|
job->jv_channel = channel; /* ch_refcount was set by add_channel() */
|
||||||
channel->ch_keep_open = TRUE;
|
channel->ch_keep_open = TRUE;
|
||||||
|
|
||||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1064,
|
||||||
/**/
|
/**/
|
||||||
1063,
|
1063,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user