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 #5208)
diff --git a/src/terminal.c b/src/terminal.c
index a3ca993..dcb4c39 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -844,6 +844,7 @@
// :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;