1
0
forked from aniani/vim

patch 8.1.1028: MS-Windows: memory leak when creating terminal fails

Problem:    MS-Windows: memory leak when creating terminal fails.
Solution:   Free the command. (Ken Takata, closes #4138)
This commit is contained in:
Bram Moolenaar
2019-03-21 19:58:00 +01:00
parent 08cda65ddf
commit 9029b918f9
2 changed files with 5 additions and 0 deletions

View File

@@ -4866,7 +4866,10 @@ mch_call_shell_terminal(
argvar[1].v_type = VAR_UNKNOWN;
buf = term_start(argvar, NULL, &opt, TERM_START_SYSTEM);
if (buf == NULL)
{
vim_free(newcmd);
return 255;
}
job = term_getjob(buf->b_term);
++job->jv_refcount;

View File

@@ -779,6 +779,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1028,
/**/
1027,
/**/