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();
|
||||
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;
|
||||
|
||||
|
Reference in New Issue
Block a user