mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
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();
|
||||
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;
|
||||
|
||||
|
@@ -769,6 +769,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1064,
|
||||
/**/
|
||||
1063,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user