summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-11-10 22:36:44 +0100
committerBram Moolenaar <Bram@vim.org>2019-11-10 22:36:44 +0100
commitadf4aa200b026dce91dd169143ee8b93e848ec8b (patch)
tree957897bedefa45724a5440f0d07bfcfb76bfda45
parent5ef1c6a4838a9629b793f3ae676f72a764171b00 (diff)
patch 8.1.2291: memory leak when executing command in a terminalv8.1.2291
Problem: Memory leak when executing command in a terminal. Solution: Free "argv". (Dominique Pelle, closes #5208)
-rw-r--r--src/terminal.c1
-rw-r--r--src/version.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c
index a3ca993394..dcb4c398d4 100644
--- 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;
diff --git a/src/version.c b/src/version.c
index da05b0a6b9..f2b1a758a7 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2291,
+/**/
2290,
/**/
2289,