1
0
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:
Bram Moolenaar
2020-05-07 22:23:58 +02:00
parent f0eefce93b
commit cca34aa4be
2 changed files with 4 additions and 0 deletions

View File

@@ -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
{