# HG changeset patch # User Bram Moolenaar # Date 1553194806 -3600 # Node ID 884b683d12e93f586287ddfff1067d6c3a14b9bd # Parent ebe25581b7d67d987b098347320af26f246efc57 patch 8.1.1028: MS-Windows: memory leak when creating terminal fails commit https://github.com/vim/vim/commit/9029b918f902c01e8f46441155ec2f01690929f9 Author: Bram Moolenaar 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) diff --git a/src/os_win32.c b/src/os_win32.c --- 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; diff --git a/src/version.c b/src/version.c --- 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,