]> granicus.if.org Git - vim/commitdiff
patch 8.1.2291: memory leak when executing command in a terminal v8.1.2291
authorBram Moolenaar <Bram@vim.org>
Sun, 10 Nov 2019 21:36:44 +0000 (22:36 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 10 Nov 2019 21:36:44 +0000 (22:36 +0100)
Problem:    Memory leak when executing command in a terminal.
Solution:   Free "argv". (Dominique Pelle, closes #5208)

src/terminal.c
src/version.c

index a3ca993394584fc9311cd9e1706520b2af6d4050..dcb4c398d42f7093cf1a4bf2a2dc88e14c20bec1 100644 (file)
@@ -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;
index da05b0a6b99e1e576bd3e001a1d9e324c018cb84..f2b1a758a7c35674a874d39c674beee80fdfa0ca 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2291,
 /**/
     2290,
 /**/