Mercurial > vim
changeset 18595:517bfb2998aa v8.1.2291
patch 8.1.2291: memory leak when executing command in a terminal
Commit: https://github.com/vim/vim/commit/adf4aa200b026dce91dd169143ee8b93e848ec8b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 10 22:36:44 2019 +0100
patch 8.1.2291: memory leak when executing command in a terminal
Problem: Memory leak when executing command in a terminal.
Solution: Free "argv". (Dominique Pelle, closes https://github.com/vim/vim/issues/5208)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 10 Nov 2019 22:45:03 +0100 |
parents | e9a47bcf7b94 |
children | 2bffaff5d64d |
files | src/terminal.c src/version.c |
diffstat | 2 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -844,6 +844,7 @@ ex_terminal(exarg_T *eap) // :term ++shell command if (unix_build_argv(cmd, &argv, &tofree1, &tofree2) == OK) term_start(NULL, argv, &opt, eap->forceit ? TERM_START_FORCEIT : 0); + vim_free(argv); vim_free(tofree1); vim_free(tofree2); goto theend;