diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-03-21 19:58:00 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-03-21 19:58:00 +0100 |
commit | 9029b918f902c01e8f46441155ec2f01690929f9 (patch) | |
tree | e3991d4c8fe66a779f7e958e19205232ba0e0643 /src/os_win32.c | |
parent | 08cda65ddfbb4bce8cef43726a0c00817fc47327 (diff) |
patch 8.1.1028: MS-Windows: memory leak when creating terminal failsv8.1.1028
Problem: MS-Windows: memory leak when creating terminal fails.
Solution: Free the command. (Ken Takata, closes #4138)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index ff11777220..7930957ad3 100644 --- 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; |