Skip to content

Commit fffdf47

Browse files
committed
patch 8.2.2142: memory leak when heredoc is not terminated
Problem: Memory leak when heredoc is not terminated. Solution: Free heredoc_trimmed.
1 parent 8143a53 commit fffdf47

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

src/userfunc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,6 +3705,7 @@ define_function(exarg_T *eap, char_u *name_arg)
37053705
ret_free:
37063706
ga_clear_strings(&argtypes);
37073707
vim_free(skip_until);
3708+
vim_free(heredoc_trimmed);
37083709
vim_free(line_to_free);
37093710
vim_free(fudi.fd_newkey);
37103711
if (name != name_arg)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2142,
753755
/**/
754756
2141,
755757
/**/

0 commit comments

Comments
 (0)