mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user