changeset 16046:884b683d12e9 v8.1.1028

patch 8.1.1028: MS-Windows: memory leak when creating terminal fails commit https://github.com/vim/vim/commit/9029b918f902c01e8f46441155ec2f01690929f9 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 21 19:58:00 2019 +0100 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 https://github.com/vim/vim/issues/4138)
author Bram Moolenaar <Bram@vim.org>
date Thu, 21 Mar 2019 20:00:06 +0100
parents ebe25581b7d6
children 6c72c41c706c
files src/os_win32.c src/version.c
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -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;
--- a/src/version.c
+++ b/src/version.c
@@ -780,6 +780,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1028,
+/**/
     1027,
 /**/
     1026,