forked from aniani/vim
patch 8.2.0715: Vim9: leaking memory
Problem: Vim9: leaking memory. Solution: Free strings after concatenating them.
This commit is contained in:
@@ -746,6 +746,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
715,
|
||||
/**/
|
||||
714,
|
||||
/**/
|
||||
|
||||
@@ -4229,6 +4229,8 @@ compile_expr5(char_u **arg, cctx_T *cctx)
|
||||
}
|
||||
mch_memmove(tv1.vval.v_string, s1, len1);
|
||||
STRCPY(tv1.vval.v_string + len1, s2);
|
||||
vim_free(s1);
|
||||
vim_free(s2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user