0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2142: memory leak when heredoc is not terminated

Problem:    Memory leak when heredoc is not terminated.
Solution:   Free heredoc_trimmed.
This commit is contained in:
Bram Moolenaar
2020-12-13 21:16:55 +01:00
parent 8143a53c53
commit fffdf4754f
2 changed files with 3 additions and 0 deletions

View File

@@ -3705,6 +3705,7 @@ errret_2:
ret_free: ret_free:
ga_clear_strings(&argtypes); ga_clear_strings(&argtypes);
vim_free(skip_until); vim_free(skip_until);
vim_free(heredoc_trimmed);
vim_free(line_to_free); vim_free(line_to_free);
vim_free(fudi.fd_newkey); vim_free(fudi.fd_newkey);
if (name != name_arg) if (name != name_arg)

View File

@@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2142,
/**/ /**/
2141, 2141,
/**/ /**/